diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1997-08-02 19:06:27 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1997-08-02 19:06:27 -0400 |
commit | 293facbcd45af5575345cd44394f3ead1661aacf (patch) | |
tree | 484c2a087fe75bdbd775bdd1acc1a39cf5270929 | |
parent | ae0a3dfbf49c9bcd36520a722c544f30f19b441b (diff) |
parmlist_tags_warning): Only suppress warning on union if anonymous.
From-SVN: r14638
-rw-r--r-- | gcc/c-decl.c | 2 |
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", |