aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1997-08-02 23:06:27 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1997-08-02 23:06:27 +0000
commit18533aef15f38c06f0f8097857693ec1e576c0d4 (patch)
tree484c2a087fe75bdbd775bdd1acc1a39cf5270929 /gcc
parenteb4221f459f8f2ba2c0f6dfde52c5b928964bb1c (diff)
parmlist_tags_warning): Only suppress warning on union if anonymous.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14638 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-decl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 295e5941ab7..125f0f49814 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -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",