From 26cb3d1ca15647082908b129aa16efe653cfc35f Mon Sep 17 00:00:00 2001 From: tromey Date: Fri, 29 Feb 2008 20:09:05 +0000 Subject: gcc * toplev.c (input_file_stack, input_file_stack_tick, fs_p, input_file_stack_history, input_file_stack_restored): Remove. (push_srcloc, pop_srcloc, restore_input_file_stack): Likewise. * input.h (struct file_stack): Remove. (push_srcloc, pop_srcloc, restore_input_file_stack): Likewise. (input_file_stack, input_file_stack_tick, INPUT_FILE_STACK_BITS): Likewise. * diagnostic.h (struct diagnostic_context) : Change type. (diagnostic_last_module_changed): Add 'map' argument. (diagnostic_set_last_function): Likewise. * diagnostic.c (undiagnostic_report_current_module): Iterate using line map, not input_file_stack. * c-lex.c (fe_file_change): Don't use push_srcloc or pop_srcloc. gcc/cp * parser.c (struct cp_token) : Remove. (cp_lexer_get_preprocessor_token): Update. (cp_lexer_set_source_position_from_token): Don't call restore_input_file_stack. * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc. gcc/testsuite * g++.dg/warn/pragma-system_header2.C: Ignore "included from" line. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132775 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/diagnostic.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'gcc/diagnostic.h') diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h index 02e43bd0f8e..992c0c46025 100644 --- a/gcc/diagnostic.h +++ b/gcc/diagnostic.h @@ -1,5 +1,5 @@ /* Various declarations for language-independent diagnostics subroutines. - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. Contributed by Gabriel Dos Reis @@ -110,8 +110,9 @@ struct diagnostic_context function name. */ tree last_function; - /* Used to detect when input_file_stack has changed since last described. */ - int last_module; + /* Used to detect when the input file stack has changed since last + described. */ + const struct line_map *last_module; int lock; }; @@ -152,13 +153,13 @@ struct diagnostic_context /* True if the last module or file in which a diagnostic was reported is different from the current one. */ -#define diagnostic_last_module_changed(DC) \ - ((DC)->last_module != input_file_stack_tick) +#define diagnostic_last_module_changed(DC, MAP) \ + ((DC)->last_module != MAP) /* Remember the current module or file as being the last one in which we report a diagnostic. */ -#define diagnostic_set_last_module(DC) \ - (DC)->last_module = input_file_stack_tick +#define diagnostic_set_last_module(DC, MAP) \ + (DC)->last_module = MAP /* Raise SIGABRT on any diagnostic of severity DK_ERROR or higher. */ #define diagnostic_abort_on_error(DC) \ -- cgit v1.2.1