(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
raw-string-16.c
       1  // PR preprocessor/57620
       2  // { dg-do compile }
       3  // { dg-options "-std=gnu99 -Wtrigraphs" { target c } }
       4  // { dg-options "-std=gnu++11 -Wtrigraphs" { target c++ } }
       5  
       6  const void *s0 = R"abc\
       7  def()abcdef" 0;
       8  	// { dg-error "invalid character" "invalid" { target *-*-* } 6 }
       9  	// { dg-error "stray" "stray" { target *-*-* } 6 }
      10  const void *s1 = R"abcdefghijklmn??/(a)abcdefghijklmn???" 0;
      11  	// { dg-error "raw string delimiter longer" "longer" { target *-*-* } .-1 }
      12  	// { dg-error "stray" "stray" { target *-*-* } .-2 }
      13  
      14  const void *s2 = R"abcdefghijklmno??/(a)abcdefghijklmno???" 0;
      15  	// { dg-error "raw string delimiter longer" "longer" { target *-*-* } .-1 }
      16  	// { dg-error "stray" "stray" { target *-*-* } .-2 }
      17  const void *s3 = R"abcdefghijklmnop??=(a)abcdefghijklmnop??=?" 0;
      18  	// { dg-error "raw string delimiter longer" "longer" { target *-*-* } .-1 }
      19  	// { dg-error "stray" "stray" { target *-*-* } .-2 }
      20  const void *s4 = R"abc\
      21  ()abcdef" 0;
      22  	// { dg-error "invalid character" "invalid" { target *-*-* } 20 }
      23  	// { dg-error "stray" "stray" { target *-*-* } 20 }
      24  const void *s5 = R"\
      25  ()" 0;
      26  	// { dg-error "invalid character" "invalid" { target *-*-* } 24 }
      27  	// { dg-error "stray" "stray" { target *-*-* } 24 }
      28  const void *s6 = R"\
      29  a()a" 0;
      30  	// { dg-error "invalid character" "invalid" { target *-*-* } 28 }
      31  	// { dg-error "stray" "stray" { target *-*-* } 28 }
      32  
      33  int main () {}