diff options
author | Joseph Myers <joseph@codesourcery.com> | 2006-08-26 22:38:46 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2006-08-26 22:38:46 +0100 |
commit | 02ec74b9d26c400f219a1975a1d39e03c39b3c0c (patch) | |
tree | a5124e3c47e8d988de14e9615b356c0d0eb3b461 /gcc/input.h | |
parent | 63d0dca480ee0f7ebe02d1e73c579e5547e1d6d2 (diff) | |
download | gcc-02ec74b9d26c400f219a1975a1d39e03c39b3c0c.zip gcc-02ec74b9d26c400f219a1975a1d39e03c39b3c0c.tar.gz gcc-02ec74b9d26c400f219a1975a1d39e03c39b3c0c.tar.bz2 |
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
Diffstat (limited to 'gcc/input.h')
-rw-r--r-- | gcc/input.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/input.h b/gcc/input.h index 0ca3ccf..2fea1a6 100644 --- a/gcc/input.h +++ b/gcc/input.h @@ -84,6 +84,7 @@ extern void push_srcloc (location_t); extern void push_srcloc (const char *name, int line); #endif /* ! USE_MAPPED_LOCATION */ extern void pop_srcloc (void); +extern void restore_input_file_stack (int); #define LOCATION_FILE(LOC) ((expand_location (LOC)).file) #define LOCATION_LINE(LOC) ((expand_location (LOC)).line) @@ -98,4 +99,7 @@ extern struct file_stack *input_file_stack; /* Incremented on each change to input_file_stack. */ extern int input_file_stack_tick; +/* The number of bits available for input_file_stack_tick. */ +#define INPUT_FILE_STACK_BITS 31 + #endif |