Commit 60696c53 by Jason Merrill

decl2.c (arg_assoc_class): Fix double iteration logic.

        * decl2.c (arg_assoc_class): Fix double iteration logic.

        * init.c (build_delete): Always call convert_force to strip cv-quals.

        * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
        * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
        * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.

From-SVN: r39133
parent 1e00f18c
2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
* decl2.c (arg_assoc_class): Fix double iteration logic.
2001-01-19 Jason Merrill <jason@redhat.com>
* init.c (build_delete): Always call convert_force to strip cv-quals.
* decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
* lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
* g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
2001-01-19 Nathan Sidwell <nathan@codesourcery.com> 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
* search.c (get_vbase_1): Count only virtual bases. * search.c (get_vbase_1): Count only virtual bases.
......
...@@ -417,7 +417,11 @@ int flag_weak = 1; ...@@ -417,7 +417,11 @@ int flag_weak = 1;
/* Nonzero to enable experimental ABI changes. */ /* Nonzero to enable experimental ABI changes. */
#if ENABLE_NEW_GXX_ABI
int flag_new_abi = 1;
#else
int flag_new_abi; int flag_new_abi;
#endif
/* Nonzero to use __cxa_atexit, rather than atexit, to register /* Nonzero to use __cxa_atexit, rather than atexit, to register
destructors for local statics and global objects. */ destructors for local statics and global objects. */
...@@ -4846,9 +4850,9 @@ arg_assoc_class (k, type) ...@@ -4846,9 +4850,9 @@ arg_assoc_class (k, type)
friends = TREE_CHAIN (friends)) friends = TREE_CHAIN (friends))
/* Only interested in global functions with potentially hidden /* Only interested in global functions with potentially hidden
(i.e. unqualified) declarations. */ (i.e. unqualified) declarations. */
if (TREE_PURPOSE (list) == error_mark_node && TREE_VALUE (list) if (TREE_PURPOSE (friends) == error_mark_node && TREE_VALUE (friends)
&& decl_namespace (TREE_VALUE (list)) == context) && decl_namespace (TREE_VALUE (friends)) == context)
if (add_function (k, TREE_VALUE (list))) if (add_function (k, TREE_VALUE (friends)))
return 1; return 1;
/* Process template arguments. */ /* Process template arguments. */
......
...@@ -94,10 +94,6 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries) ...@@ -94,10 +94,6 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
/* The total number of arguments with the new stuff. */ /* The total number of arguments with the new stuff. */
int num_args = 1; int num_args = 1;
#if ENABLE_NEW_GXX_ABI
added++;
#endif
argc = *in_argc; argc = *in_argc;
argv = *in_argv; argv = *in_argv;
added_libraries = *in_added_libraries; added_libraries = *in_added_libraries;
...@@ -211,13 +207,6 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries) ...@@ -211,13 +207,6 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
/* Copy the 0th argument, i.e., the name of the program itself. */ /* Copy the 0th argument, i.e., the name of the program itself. */
arglist[i++] = argv[j++]; arglist[i++] = argv[j++];
#if ENABLE_NEW_GXX_ABI
/* If we should use the new ABI by default, add the appropriate flag
to cc1plus here. We put this first so that it can be overridden
by other command-line options. */
arglist[j++] = "-fnew-abi";
#endif
/* NOTE: We start at 1 now, not 0. */ /* NOTE: We start at 1 now, not 0. */
while (i < argc) while (i < argc)
{ {
......
...@@ -3228,10 +3228,7 @@ build_delete (type, addr, auto_delete, flags, use_global_delete) ...@@ -3228,10 +3228,7 @@ build_delete (type, addr, auto_delete, flags, use_global_delete)
if (TREE_SIDE_EFFECTS (addr)) if (TREE_SIDE_EFFECTS (addr))
addr = save_expr (addr); addr = save_expr (addr);
if (TREE_CONSTANT (addr)) addr = convert_force (build_pointer_type (type), addr, 0);
addr = convert_pointer_to (type, addr);
else
addr = convert_force (build_pointer_type (type), addr, 0);
ref = build_indirect_ref (addr, NULL_PTR); ref = build_indirect_ref (addr, NULL_PTR);
} }
...@@ -3240,7 +3237,7 @@ build_delete (type, addr, auto_delete, flags, use_global_delete) ...@@ -3240,7 +3237,7 @@ build_delete (type, addr, auto_delete, flags, use_global_delete)
if (TYPE_HAS_TRIVIAL_DESTRUCTOR (type)) if (TYPE_HAS_TRIVIAL_DESTRUCTOR (type))
{ {
if (auto_delete == sfk_base_destructor) if (auto_delete != sfk_deleting_destructor)
return void_zero_node; return void_zero_node;
return build_op_delete_call return build_op_delete_call
......
...@@ -31,6 +31,25 @@ Boston, MA 02111-1307, USA. */ ...@@ -31,6 +31,25 @@ Boston, MA 02111-1307, USA. */
{"@c++", {"@c++",
/* cc1plus has an integrated ISO C preprocessor. We should invoke /* cc1plus has an integrated ISO C preprocessor. We should invoke
the external preprocessor if -save-temps is given. */ the external preprocessor if -save-temps is given. */
#if ENABLE_NEW_GXX_ABI
"%{E|M|MM:cpp0 -lang-c++ -D_GNU_SOURCE %{!no-gcc:-D__GNUG__=%v1}\
%{!fno-new-abi:-D__GXX_ABI_VERSION=100}\
%{ansi:-D__STRICT_ANSI__ -trigraphs -$} %(cpp_options)}\
%{!E:%{!M:%{!MM:\
%{save-temps:cpp0 -lang-c++ -D_GNU_SOURCE \
%{!no-gcc:-D__GNUG__=%v1}\
%{!fno-new-abi:-D__GXX_ABI_VERSION=100}\
%{ansi:-D__STRICT_ANSI__ -trigraphs -$}\
%(cpp_options) %b.ii \n}\
cc1plus %{save-temps:-fpreprocessed %b.ii}\
%{!save-temps:%(cpp_options)\
%{!no-gcc:-D__GNUG__=%v1} -D_GNU_SOURCE \
%{!fno-new-abi:-D__GXX_ABI_VERSION=100}\
%{ansi:-D__STRICT_ANSI__}}\
%{ansi:-trigraphs -$}\
%(cc1_options) %2 %{+e1*}\
%{!fsyntax-only:%(invoke_as)}}}}"
#else
"%{E|M|MM:cpp0 -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\ "%{E|M|MM:cpp0 -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\
%{fnew-abi:-D__GXX_ABI_VERSION=100}\ %{fnew-abi:-D__GXX_ABI_VERSION=100}\
%{ansi:-D__STRICT_ANSI__ -trigraphs -$} %(cpp_options)}\ %{ansi:-D__STRICT_ANSI__ -trigraphs -$} %(cpp_options)}\
...@@ -47,7 +66,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -47,7 +66,9 @@ Boston, MA 02111-1307, USA. */
%{ansi:-D__STRICT_ANSI__}}\ %{ansi:-D__STRICT_ANSI__}}\
%{ansi:-trigraphs -$}\ %{ansi:-trigraphs -$}\
%(cc1_options) %2 %{+e*}\ %(cc1_options) %2 %{+e*}\
%{!fsyntax-only:%(invoke_as)}}}}"}, %{!fsyntax-only:%(invoke_as)}}}}"
#endif
},
{".ii", "@c++-cpp-output"}, {".ii", "@c++-cpp-output"},
{"@c++-cpp-output", {"@c++-cpp-output",
"%{!M:%{!MM:%{!E:\ "%{!M:%{!MM:%{!E:\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment