diff options
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 619c20c..f212e18 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -2706,6 +2706,10 @@ define_label (filename, line, name) decl = lookup_label (name); } + if (warn_traditional && lookup_name (name)) + warning ("traditional C lacks a separate namespace for labels, identifier `%s' conflicts", + IDENTIFIER_POINTER (name)); + if (DECL_INITIAL (decl) != 0) { error ("duplicate label `%s'", IDENTIFIER_POINTER (name)); |