summaryrefslogtreecommitdiff
path: root/gcc/diagnostic.h
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2008-02-29 20:09:05 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2008-02-29 20:09:05 +0000
commit26cb3d1ca15647082908b129aa16efe653cfc35f (patch)
tree11ac9314a803ee4f351c76ac29b94a265faace5a /gcc/diagnostic.h
parenta09d677038b7b7fdc30f389ebb90d9e2dadf1b37 (diff)
downloadgcc-26cb3d1ca15647082908b129aa16efe653cfc35f.tar.gz
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) <last_module>: 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) <input_file_stack_index>: 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
Diffstat (limited to 'gcc/diagnostic.h')
-rw-r--r--gcc/diagnostic.h15
1 files changed, 8 insertions, 7 deletions
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 <gdr@codesourcery.com>
@@ -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) \