diff options
author | kan <kan@FreeBSD.org> | 2003-08-22 03:26:30 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2003-08-22 03:26:30 +0000 |
commit | 49a4324488979060b7c816c30be02c99441ab5b0 (patch) | |
tree | ec31c2dfd3a50c9cc215893cb92bb3930d7c1291 /contrib/gcc/c-lex.c | |
parent | f2372ee34aed08901e7410557eb6965fc1e6d8e8 (diff) | |
download | FreeBSD-src-49a4324488979060b7c816c30be02c99441ab5b0.zip FreeBSD-src-49a4324488979060b7c816c30be02c99441ab5b0.tar.gz |
Merge FreeBSD modifications into gcc 3.3.1-prerelease:
1.2 don't let gcc(1) hide warnings in system headers.
Don't disable warning suppression unconditionally, but rather
make in dependent on warn_system_headers flag, one should be
able to use -Wno-system-headers flag if warnings from system
headers are not desired.
Diffstat (limited to 'contrib/gcc/c-lex.c')
-rw-r--r-- | contrib/gcc/c-lex.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/contrib/gcc/c-lex.c b/contrib/gcc/c-lex.c index 30f89ab..dcfdc10 100644 --- a/contrib/gcc/c-lex.c +++ b/contrib/gcc/c-lex.c @@ -299,11 +299,13 @@ cb_file_change (pfile, new_map) } update_header_times (new_map->to_file); -#ifndef FREEBSD_NATIVE - in_system_header = new_map->sysp != 0; -#else /* FREEBSD_NATIVE */ - in_system_header = 0; -#endif /* FREEBSD_NATIVE */ + in_system_header = (warn_system_headers && new_map->sysp != 0); +#ifdef FREEBSD_NATIVE + /* Correct logic should be: if warn_system_headers is set, no + header file should be considered system, so that no warnings + will be suppressed. */ + if (warn_system_headers) in_system_header = 0; +#endif input_filename = new_map->to_file; lineno = to_line; map = new_map; |