@@ -2655,7 +2655,8 @@ lex_raw_string (cpp_reader *pfile, cpp_token *token, const uchar *base)
{
pos--;
pfile->buffer->cur = pos;
- if ((pfile->state.in_directive || pfile->state.parsing_args)
+ if ((pfile->state.in_directive || pfile->state.parsing_args
+ || pfile->state.in_deferred_pragma)
&& pfile->buffer->next_line >= pfile->buffer->rlimit)
{
cpp_error_with_line (pfile, CPP_DL_ERROR, token->src_loc, 0,
new file mode 100644
@@ -0,0 +1,8 @@
+/* { dg-options "-std=gnu99" { target c } } */
+/* { dg-options "-std=c++11" { target c++ } } */
+
+/* { dg-error "invalid new-line in raw string delimiter" "" { target *-*-* } .+4 } */
+/* { dg-error "unterminated raw string" "" { target *-*-* } .+3 } */
+/* { dg-error "stray 'R' in program" "" { target *-*-* } .+2 } */
+/* { dg-warning "expected a string" "" { target *-*-* } .+1 } */
+#pragma message R""
new file mode 100644
@@ -0,0 +1,8 @@
+/* { dg-options "-std=gnu99" { target c } } */
+/* { dg-options "-std=c++11" { target c++ } } */
+
+/* { dg-error "invalid new-line in raw string delimiter" "" { target *-*-* } .+4 } */
+/* { dg-error "unterminated raw string" "" { target *-*-* } .+3 } */
+/* { dg-error "stray 'R' in program" "" { target *-*-* } .+2 } */
+/* { dg-warning "expected a string" "" { target *-*-* } .+1 } */
+_Pragma("message R\"\"")