]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
parmlist_tags_warning): Only suppress warning on union if anonymous.
authorRichard Kenner <kenner@gcc.gnu.org>
Sat, 2 Aug 1997 23:06:27 +0000 (19:06 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Sat, 2 Aug 1997 23:06:27 +0000 (19:06 -0400)
From-SVN: r14638

gcc/c-decl.c

index 295e5941ab7a18bc3c9e41ce6f5ca7c86ae0540a..125f0f49814aad44081155f7ea4e5f340b11d49a 100644 (file)
@@ -5380,7 +5380,7 @@ parmlist_tags_warning ()
       enum tree_code code = TREE_CODE (TREE_VALUE (elt));
       /* An anonymous union parm type is meaningful as a GNU extension.
         So don't warn for that.  */
-      if (code == UNION_TYPE && !pedantic)
+      if (code == UNION_TYPE && TREE_PURPOSE (elt) == 0 && !pedantic)
        continue;
       if (TREE_PURPOSE (elt) != 0)
        warning ("`%s %s' declared inside parameter list",