re PR c++/24009 (C++ fails to print #include stack)
authorJoseph Myers <joseph@codesourcery.com>
Sat, 26 Aug 2006 21:38:46 +0000 (22:38 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Sat, 26 Aug 2006 21:38:46 +0000 (22:38 +0100)
commit02ec74b9d26c400f219a1975a1d39e03c39b3c0c
treea5124e3c47e8d988de14e9615b356c0d0eb3b461
parent63d0dca480ee0f7ebe02d1e73c579e5547e1d6d2
re PR c++/24009 (C++ fails to print #include stack)

PR c++/24009
* input.h (restore_input_file_stack): Declare.
(INPUT_FILE_STACK_BITS): Define.
* toplev.c (fs_p, input_file_stack_history,
input_file_stack_restored, restore_input_file_stack): New.
(push_srcloc, pop_srcloc): Check for input_file_stack_tick
overflowing INPUT_FILE_STACK_BITS bits.  Save new state of stack.
(pop_srcloc): Don't free old state of stack.

cp:
* parser.c (struct cp_token): Add input_file_stack_index.
(eof_token): Update.
(cp_lexer_get_preprocessor_token): Save input_file_stack_tick.
(cp_lexer_set_source_position_from_token): Restore input file
stack.

From-SVN: r116479
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/input.h
gcc/toplev.c