view gcc/testsuite/c-c++-common/raw-string-5.c @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
line wrap: on
line source

// { dg-do compile }
// { dg-options "-std=gnu99" { target c } }
// { dg-options "-std=c++0x" { target c++ } }

const void *s0 = R"0123456789abcdefg()0123456789abcdefg";
	// { dg-error "raw string delimiter longer" "longer" { target *-*-* } .-1 }
	// { dg-error "stray" "stray" { target *-*-* } .-2 }
const void *s1 = R" () ";
	// { dg-error "invalid character" "invalid" { target *-*-* } .-1 }
	// { dg-error "stray" "stray" { target *-*-* } .-2 }
const void *s2 = R"	()	";
	// { dg-error "invalid character" "invalid" { target *-*-* } .-1 }
	// { dg-error "stray" "stray" { target *-*-* } .-2 }
const void *s3 = R")())";
	// { dg-error "invalid character" "invalid" { target *-*-* } .-1 }
	// { dg-error "stray" "stray" { target *-*-* } .-2 }
const void *s4 = R"@()@";
	// { dg-error "invalid character" "invalid" { target *-*-* } .-1 }
	// { dg-error "stray" "stray" { target *-*-* } .-2 }
const void *s5 = R"$()$";
	// { dg-error "invalid character" "invalid" { target *-*-* } .-1 }
	// { dg-error "stray" "stray" { target *-*-* } .-2 }
const void *s6 = R"\u0040()\u0040";
	// { dg-error "invalid character" "invalid" { target *-*-* } .-1 }
	// { dg-error "stray" "stray" { target *-*-* } .-2 }

int main () {}