Commit 9282f2f9 by Richard Stallman

(shadow_tag_warned): New function.

From-SVN: r1684
parent 5fe86b8b
......@@ -385,6 +385,7 @@ static struct binding_level *label_level_chain;
static tree grokparms (), grokdeclarator ();
tree pushdecl ();
tree builtin_function ();
void shadow_tag_warned ();
static tree lookup_tag ();
static tree lookup_tag_reverse ();
......@@ -2790,8 +2791,15 @@ void
shadow_tag (declspecs)
tree declspecs;
{
shadow_tag_warned (declspecs, 0);
}
void
shadow_tag_warned (declspecs, warned)
tree declspecs;
int warned;
{
int found_tag = 0;
int warned = 0;
register tree link;
pending_invalid_xref = 0;
......@@ -2812,7 +2820,7 @@ shadow_tag (declspecs)
if (name == 0)
{
if (code != ENUMERAL_TYPE) /* Empty unnamed enum OK */
if (!warned && code != ENUMERAL_TYPE) /* Empty unnamed enum OK */
{
pedwarn ("unnamed struct/union that defines no instances");
warned = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment