aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2001-01-19 10:12:33 -0500
committerJason Merrill <jason@gcc.gnu.org>2001-01-19 10:12:33 -0500
commit60696c53ecd1b353fc34dc0fd373495963329a89 (patch)
treea9789534eb58f67c343012adcc54c69ac3f67661
parent1e00f18c429f2d54fae23259eb37b81caec583f2 (diff)
downloadgcc-60696c53ecd1b353fc34dc0fd373495963329a89.zip
gcc-60696c53ecd1b353fc34dc0fd373495963329a89.tar.gz
gcc-60696c53ecd1b353fc34dc0fd373495963329a89.tar.bz2
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
-rw-r--r--gcc/cp/ChangeLog12
-rw-r--r--gcc/cp/decl2.c10
-rw-r--r--gcc/cp/g++spec.c11
-rw-r--r--gcc/cp/init.c7
-rw-r--r--gcc/cp/lang-specs.h23
5 files changed, 43 insertions, 20 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index b12874f..661e692 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 3f15b38..18b864b 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -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. */
diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
index 63787b9..1d18a08 100644
--- a/gcc/cp/g++spec.c
+++ b/gcc/cp/g++spec.c
@@ -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)
{
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 1516d69..3105ff7 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -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
diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
index 716a93b..210255e 100644
--- a/gcc/cp/lang-specs.h
+++ b/gcc/cp/lang-specs.h
@@ -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:\