aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.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/cp/parser.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/cp/parser.c')
-rw-r--r--gcc/cp/parser.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 77542bf..458ab7b 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -79,8 +79,6 @@ typedef struct cp_token GTY (())
KEYWORD is RID_MAX) iff this name was looked up and found to be
ambiguous. An error has already been reported. */
BOOL_BITFIELD ambiguous_p : 1;
- /* The input file stack index at which this token was found. */
- unsigned input_file_stack_index : INPUT_FILE_STACK_BITS;
/* The value associated with this token, if any. */
union cp_token_value {
/* Used for CPP_NESTED_NAME_SPECIFIER and CPP_TEMPLATE_ID. */
@@ -99,7 +97,7 @@ DEF_VEC_ALLOC_P (cp_token_position,heap);
static cp_token eof_token =
{
- CPP_EOF, RID_MAX, 0, PRAGMA_NONE, 0, 0, false, 0, { NULL },
+ CPP_EOF, RID_MAX, 0, PRAGMA_NONE, 0, false, 0, { NULL },
0
};
@@ -408,7 +406,6 @@ cp_lexer_get_preprocessor_token (cp_lexer *lexer, cp_token *token)
token->type
= c_lex_with_flags (&token->u.value, &token->location, &token->flags,
lexer == NULL ? 0 : C_LEX_RAW_STRINGS);
- token->input_file_stack_index = input_file_stack_tick;
token->keyword = RID_MAX;
token->pragma_kind = PRAGMA_NONE;
token->in_system_header = in_system_header;
@@ -490,7 +487,6 @@ cp_lexer_set_source_position_from_token (cp_token *token)
{
input_location = token->location;
in_system_header = token->in_system_header;
- restore_input_file_stack (token->input_file_stack_index);
}
}