summaryrefslogtreecommitdiffstats
path: root/libcpp
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-07-10 16:52:19 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-07-10 16:52:19 +0000
commitc7691e082933c6e7597e0e5bc3b4b447ce8c2841 (patch)
tree8a55834621f16e95b2d8489959ff64d7803cc254 /libcpp
parentda31536d9b7fee50eb58d2bca8e1612295a75349 (diff)
downloadppe42-gcc-c7691e082933c6e7597e0e5bc3b4b447ce8c2841.tar.gz
ppe42-gcc-c7691e082933c6e7597e0e5bc3b4b447ce8c2841.zip
PR preprocessor/57824
* lex.c (lex_raw_string): Allow reading new-lines if in_deferred_pragma or if parsing_args and there is still data in the current buffer. * c-c++-common/raw-string-17.c: New test. * c-c++-common/gomp/pr57824.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200879 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog5
-rw-r--r--libcpp/lex.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 195d728440c..9213232aa98 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,5 +1,10 @@
2013-07-10 Jakub Jelinek <jakub@redhat.com>
+ PR preprocessor/57824
+ * lex.c (lex_raw_string): Allow reading new-lines if
+ in_deferred_pragma or if parsing_args and there is still
+ data in the current buffer.
+
* include/cpplib.h (cpp_token_val_index): Change parameter type to
const cpp_token *.
* lex.c (cpp_token_val_index): Likewise.
diff --git a/libcpp/lex.c b/libcpp/lex.c
index 84e2af695d1..fc89bafd81b 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -1543,8 +1543,8 @@ lex_raw_string (cpp_reader *pfile, cpp_token *token, const uchar *base,
else if (c == '\n')
{
if (pfile->state.in_directive
- || pfile->state.parsing_args
- || pfile->state.in_deferred_pragma)
+ || (pfile->state.parsing_args
+ && pfile->buffer->next_line >= pfile->buffer->rlimit))
{
cur--;
type = CPP_OTHER;
OpenPOWER on IntegriCloud