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
This commit is contained in:
Jason Merrill 2001-01-19 10:12:33 -05:00
parent 1e00f18c42
commit 60696c53ec
5 changed files with 43 additions and 20 deletions

View File

@ -1,3 +1,15 @@
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>
* search.c (get_vbase_1): Count only virtual bases.

View File

@ -417,7 +417,11 @@ int flag_weak = 1;
/* Nonzero to enable experimental ABI changes. */
#if ENABLE_NEW_GXX_ABI
int flag_new_abi = 1;
#else
int flag_new_abi;
#endif
/* Nonzero to use __cxa_atexit, rather than atexit, to register
destructors for local statics and global objects. */
@ -4846,9 +4850,9 @@ arg_assoc_class (k, type)
friends = TREE_CHAIN (friends))
/* Only interested in global functions with potentially hidden
(i.e. unqualified) declarations. */
if (TREE_PURPOSE (list) == error_mark_node && TREE_VALUE (list)
&& decl_namespace (TREE_VALUE (list)) == context)
if (add_function (k, TREE_VALUE (list)))
if (TREE_PURPOSE (friends) == error_mark_node && TREE_VALUE (friends)
&& decl_namespace (TREE_VALUE (friends)) == context)
if (add_function (k, TREE_VALUE (friends)))
return 1;
/* Process template arguments. */

View File

@ -94,10 +94,6 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
/* The total number of arguments with the new stuff. */
int num_args = 1;
#if ENABLE_NEW_GXX_ABI
added++;
#endif
argc = *in_argc;
argv = *in_argv;
added_libraries = *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. */
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. */
while (i < argc)
{

View File

@ -3228,10 +3228,7 @@ build_delete (type, addr, auto_delete, flags, use_global_delete)
if (TREE_SIDE_EFFECTS (addr))
addr = save_expr (addr);
if (TREE_CONSTANT (addr))
addr = convert_pointer_to (type, addr);
else
addr = convert_force (build_pointer_type (type), addr, 0);
addr = convert_force (build_pointer_type (type), addr, 0);
ref = build_indirect_ref (addr, NULL_PTR);
}
@ -3240,7 +3237,7 @@ build_delete (type, addr, auto_delete, flags, use_global_delete)
if (TYPE_HAS_TRIVIAL_DESTRUCTOR (type))
{
if (auto_delete == sfk_base_destructor)
if (auto_delete != sfk_deleting_destructor)
return void_zero_node;
return build_op_delete_call

View File

@ -31,6 +31,25 @@ Boston, MA 02111-1307, USA. */
{"@c++",
/* cc1plus has an integrated ISO C preprocessor. We should invoke
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}\
%{fnew-abi:-D__GXX_ABI_VERSION=100}\
%{ansi:-D__STRICT_ANSI__ -trigraphs -$} %(cpp_options)}\
@ -47,7 +66,9 @@ Boston, MA 02111-1307, USA. */
%{ansi:-D__STRICT_ANSI__}}\
%{ansi:-trigraphs -$}\
%(cc1_options) %2 %{+e*}\
%{!fsyntax-only:%(invoke_as)}}}}"},
%{!fsyntax-only:%(invoke_as)}}}}"
#endif
},
{".ii", "@c++-cpp-output"},
{"@c++-cpp-output",
"%{!M:%{!MM:%{!E:\