diff options
author | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-09 06:30:03 +0000 |
---|---|---|
committer | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-09 06:30:03 +0000 |
commit | 0c5e3a3d7a2fd55eb181c35ea7423fdb0c3e3b61 (patch) | |
tree | b078bd18fbfd08b7038db568253cd7312a08964d /libcpp/init.c | |
parent | 8c044a9cfcda1c80167b0e393e620dc6483b1974 (diff) | |
download | gcc-0c5e3a3d7a2fd55eb181c35ea7423fdb0c3e3b61.tar.gz |
libcpp/
PR c/24101
* init.c (read_original_filename): Temporarily set
state.in_directive before calling _cpp_lex_direct for
CPP_HASH tokens.
gcc/
PR c/24101
* toplev.c (process_options): Initialize debug_hooks early
in case lang_hooks.post_options ends up calling a debug_hook.
gcc/testsuite/
PR c/24101
* gcc.dg/pr24101-1.i, gcc.dg/pr24101-2.i: New tests.
* gcc.dg/dg.exp: Run main loop also for *.i files.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106677 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/init.c')
-rw-r--r-- | libcpp/init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libcpp/init.c b/libcpp/init.c index 3074f96b5c8..bbf2705b46c 100644 --- a/libcpp/init.c +++ b/libcpp/init.c @@ -497,8 +497,10 @@ read_original_filename (cpp_reader *pfile) token = _cpp_lex_direct (pfile); if (token->type == CPP_HASH) { + pfile->state.in_directive = 1; token1 = _cpp_lex_direct (pfile); _cpp_backup_tokens (pfile, 1); + pfile->state.in_directive = 0; /* If it's a #line directive, handle it. */ if (token1->type == CPP_NUMBER) |