re PR c++/16205 (ICE with -Wall on no-throw specifier)
authorAndrew Pinski <pinskia@physics.uc.edu>
Mon, 28 Jun 2004 02:11:55 +0000 (02:11 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Mon, 28 Jun 2004 02:11:55 +0000 (19:11 -0700)
2004-06-27  Andrew Pinski  <pinskia@physics.uc.edu>

        PR c++/16205
        * c-common.c (warn_for_collisions_1): Warn for only decls which
        have a name.

From-SVN: r83759

gcc/ChangeLog
gcc/c-common.c

index 2e6fa9406a6be13bea7f043a2b68270d934f6d74..e8dd3a2ff653285c86875cbb2411613a199abc68 100644 (file)
@@ -1,5 +1,9 @@
 2004-06-27  Andrew Pinski  <pinskia@physics.uc.edu>
 
+       PR c++/16205
+       * c-common.c (warn_for_collisions_1): Warn for only decls which
+       have a name.
+
        PR c++/15145
        * c.opt (Wsequence-point): Enable for C++ and ObjC++.
 
index f48ac09fbdd05d8fa0272871c188375a1afa5e82..349df5b73c6b48557678b9dfbaa1a1ba0ffddd6b 100644 (file)
@@ -1122,7 +1122,8 @@ warn_for_collisions_1 (tree written, tree writer, struct tlist *list,
     {
       if (list->expr == written
          && list->writer != writer
-         && (! only_writes || list->writer))
+         && (! only_writes || list->writer)
+         && DECL_NAME (list->expr))
        {
          warned_ids = new_tlist (warned_ids, written, NULL_TREE);
          warning ("operation on `%s' may be undefined",