diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-29 20:09:05 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-29 20:09:05 +0000 |
commit | 26cb3d1ca15647082908b129aa16efe653cfc35f (patch) | |
tree | 11ac9314a803ee4f351c76ac29b94a265faace5a /gcc/cp/lex.c | |
parent | a09d677038b7b7fdc30f389ebb90d9e2dadf1b37 (diff) | |
download | ppe42-gcc-26cb3d1ca15647082908b129aa16efe653cfc35f.tar.gz ppe42-gcc-26cb3d1ca15647082908b129aa16efe653cfc35f.zip |
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/cp/lex.c')
-rw-r--r-- | gcc/cp/lex.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 2558a78dbf7..0b2a37259f4 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -372,6 +372,7 @@ bool statement_code_p[MAX_TREE_CODES]; bool cxx_init (void) { + location_t saved_loc; unsigned int i; static const enum tree_code stmt_codes[] = { CTOR_INITIALIZER, TRY_BLOCK, HANDLER, @@ -385,7 +386,8 @@ cxx_init (void) for (i = 0; i < ARRAY_SIZE (stmt_codes); i++) statement_code_p[stmt_codes[i]] = true; - push_srcloc (BUILTINS_LOCATION); + saved_loc = input_location; + input_location = BUILTINS_LOCATION; init_reswords (); init_tree (); @@ -413,7 +415,7 @@ cxx_init (void) if (c_common_init () == false) { - pop_srcloc(); + input_location = saved_loc; return false; } @@ -421,7 +423,7 @@ cxx_init (void) init_repo (); - pop_srcloc(); + input_location = saved_loc; return true; } |