2004-06-27 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 28 Jun 2004 02:11:55 +0000 (02:11 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 28 Jun 2004 02:11:55 +0000 (02:11 +0000)
        PR c++/16205
        * c-common.c (warn_for_collisions_1): Warn for only decls which
        have a name.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83759 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-common.c

index 2e6fa94..e8dd3a2 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 f48ac09..349df5b 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",