diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-13 21:10:07 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-13 21:10:07 +0000 |
commit | 8302ff7fb84b43fb4f55df25284ed517f56b873e (patch) | |
tree | 5f5d1ece2626b71732e651e128c1cd46bd507234 /libcpp/directives.c | |
parent | de56c139f840ba216e51b2439d55e0c4cc19fb65 (diff) | |
download | gcc-8302ff7fb84b43fb4f55df25284ed517f56b873e.tar.gz |
gcc/testsuite
PR libcpp/35322:
* gcc.dg/cpp/pr35322.c: New file.
libcpp
PR libcpp/35322:
* directives.c (destringize_and_run): Set pfile->directive.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133195 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/directives.c')
-rw-r--r-- | libcpp/directives.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libcpp/directives.c b/libcpp/directives.c index c77e84bfec1..249a2324ee7 100644 --- a/libcpp/directives.c +++ b/libcpp/directives.c @@ -1507,6 +1507,7 @@ destringize_and_run (cpp_reader *pfile, const cpp_string *in) tokenrun *saved_cur_run; cpp_token *toks; int count; + const struct directive *save_directive; dest = result = (char *) alloca (in->len - 1); src = in->text + 1 + (in->text[0] == 'L'); @@ -1547,8 +1548,11 @@ destringize_and_run (cpp_reader *pfile, const cpp_string *in) start_directive (pfile); _cpp_clean_line (pfile); + save_directive = pfile->directive; + pfile->directive = &dtable[T_PRAGMA]; do_pragma (pfile); end_directive (pfile, 1); + pfile->directive = save_directive; /* We always insert at least one token, the directive result. It'll either be a CPP_PADDING or a CPP_PRAGMA. In the later case, we |