From 1e8f4442caeb518cbacd7a712357e0052c66ee62 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Sat, 2 Aug 1997 23:06:27 +0000 Subject: parmlist_tags_warning): Only suppress warning on union if anonymous. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@14638 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/c-decl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", -- cgit v1.2.3