aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2000-08-21 14:54:28 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2000-08-21 14:54:28 +0000
commitcde6e6843d0521cc837be3d5154be6c3ab93a254 (patch)
tree567643882a164b0c7c6014faac6840e3404eb29e /gcc/c-decl.c
parent120dc6cd25a52db6221ea7ccf1a07acea21d3a02 (diff)
downloadgcc-cde6e6843d0521cc837be3d5154be6c3ab93a254.zip
gcc-cde6e6843d0521cc837be3d5154be6c3ab93a254.tar.gz
gcc-cde6e6843d0521cc837be3d5154be6c3ab93a254.tar.bz2
c-decl.c (duplicate_decls, [...]): Restrict -Wtraditional warnings to user code.
* c-decl.c (duplicate_decls, define_label): Restrict -Wtraditional warnings to user code. * c-lex.c (readescape, yylex): Likewise. * c-typeck.c (store_init_value, process_init_element): Likewise (c_expand_start_case): Format. From-SVN: r35845
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index c9afb28..17b131a 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -1760,7 +1760,7 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
/* If warn_traditional, warn when a non-static function
declaration follows a static one. */
- if (warn_traditional
+ if (warn_traditional && !in_system_header
&& TREE_CODE (olddecl) == FUNCTION_DECL
&& !TREE_PUBLIC (olddecl)
&& TREE_PUBLIC (newdecl))
@@ -2751,7 +2751,7 @@ define_label (filename, line, name)
decl = lookup_label (name);
}
- if (warn_traditional && lookup_name (name))
+ if (warn_traditional && !in_system_header && lookup_name (name))
warning ("traditional C lacks a separate namespace for labels, identifier `%s' conflicts",
IDENTIFIER_POINTER (name));