From: Richard Kenner Date: Sat, 2 Aug 1997 23:06:27 +0000 (-0400) Subject: parmlist_tags_warning): Only suppress warning on union if anonymous. X-Git-Tag: misc/cutover-egcs-0~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=293facbcd45af5575345cd44394f3ead1661aacf;p=thirdparty%2Fgcc.git parmlist_tags_warning): Only suppress warning on union if anonymous. From-SVN: r14638 --- diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 295e5941ab7a..125f0f49814a 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",