From: Richard Stallman Date: Sat, 25 Jul 1992 08:06:54 +0000 (+0000) Subject: (shadow_tag_warned): New function. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9282f2f99b5ea1442fc568bd96eab0bd34e05c97;p=gcc.git (shadow_tag_warned): New function. From-SVN: r1684 --- diff --git a/gcc/c-decl.c b/gcc/c-decl.c index d6b64e3891e..096ce321d1e 100644 --- a/gcc/c-decl.c +++ b/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;