No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gcc4 / gcc / testsuite / gcc.dg / cpp / trad / literals-1.c
blob15c8030fa550033c615e8f9da067909ce7206f23
1 /* Test that (what looks like) comments are not recognized in literals
2 and that quotes within quotes do not confused the preprocessor. */
4 /* { dg-do run } */
6 extern void abort (void);
8 int main ()
10 const char *str1 = "/*";
11 const char *str2 = "'";
13 if (str1[0] != '/' || str1[1] != '*' || str1[2] != '\0')
14 abort ();
16 if (str2[0] != '\'' || str2[1] != '\0')
17 abort ();
19 #if '"' != '\"'
20 # error /* { dg-bogus "error" "double quote in charconst" } */
21 #endif
23 #if !'\''
24 # error quote /* { dg-bogus "quote" "quote in charconst" } */
25 #endif
27 return 0;