aboutsummaryrefslogtreecommitdiff
path: root/libcpp/lex.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2013-07-10 18:52:19 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2013-07-10 18:52:19 +0200
commitd5e48350b40fcec6459dceef282f2ecf6eba3201 (patch)
tree8a55834621f16e95b2d8489959ff64d7803cc254 /libcpp/lex.c
parentc26302d5351c07a12a5c434f392a5df89381dd8e (diff)
re PR preprocessor/57824 (Raw string literals not handled correctly in macro arguments or deferred pragmas)
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. From-SVN: r200879
Diffstat (limited to 'libcpp/lex.c')
-rw-r--r--libcpp/lex.c4
1 files changed, 2 insertions, 2 deletions
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;