(shadow_tag_warned): New function.
From-SVN: r1684
This commit is contained in:
parent
5fe86b8b83
commit
9282f2f99b
12
gcc/c-decl.c
12
gcc/c-decl.c
@ -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 ();
|
||||
@ -2789,9 +2790,16 @@ builtin_function (name, type, function_code, library_name)
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user