aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-lex.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2008-02-29 20:09:05 +0000
committerTom Tromey <tromey@gcc.gnu.org>2008-02-29 20:09:05 +0000
commit966e8f4d3fa971039cad79e25de0f0cb385a9368 (patch)
tree11ac9314a803ee4f351c76ac29b94a265faace5a /gcc/c-lex.c
parent3cbe0ba6aab8e6310613a7cfc1d153840f210cf7 (diff)
downloadgcc-966e8f4d3fa971039cad79e25de0f0cb385a9368.zip
gcc-966e8f4d3fa971039cad79e25de0f0cb385a9368.tar.gz
gcc-966e8f4d3fa971039cad79e25de0f0cb385a9368.tar.bz2
toplev.c (input_file_stack, [...]): Remove.
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. From-SVN: r132775
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r--gcc/c-lex.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index 7bc283b..617cd7e 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -207,8 +207,7 @@ fe_file_change (const struct line_map *new_map)
{
int included_at = LAST_SOURCE_LINE_LOCATION (new_map - 1);
- input_location = included_at;
- push_srcloc (new_map->start_location);
+ input_location = new_map->start_location;
(*debug_hooks->start_source_file) (included_at, new_map->to_file);
#ifndef NO_IMPLICIT_EXTERN_C
if (c_header_level)
@@ -231,7 +230,7 @@ fe_file_change (const struct line_map *new_map)
--pending_lang_change;
}
#endif
- pop_srcloc ();
+ input_location = new_map->start_location;
(*debug_hooks->end_source_file) (new_map->to_line);
}