summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/c-lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/c-lex.c')
-rw-r--r--contrib/gcc/c-lex.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/contrib/gcc/c-lex.c b/contrib/gcc/c-lex.c
index c852e31..dcfdc10 100644
--- a/contrib/gcc/c-lex.c
+++ b/contrib/gcc/c-lex.c
@@ -19,6 +19,8 @@ along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
+/* $FreeBSD$ */
+
#include "config.h"
#include "system.h"
@@ -245,11 +247,8 @@ static void
cb_line_change (pfile, token, parsing_args)
cpp_reader *pfile ATTRIBUTE_UNUSED;
const cpp_token *token;
- int parsing_args;
+ int parsing_args ATTRIBUTE_UNUSED;
{
- if (token->type == CPP_EOF || parsing_args)
- return;
-
src_lineno = SOURCE_LINE (map, token->line);
}
@@ -300,7 +299,13 @@ cb_file_change (pfile, new_map)
}
update_header_times (new_map->to_file);
- in_system_header = new_map->sysp != 0;
+ 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;
OpenPOWER on IntegriCloud