]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/gcc.dg/cxx-comments-1.c
Test cases for c++ comments and endif labels in system headers.
[gcc.git] / gcc / testsuite / gcc.dg / cxx-comments-1.c
1 /* { dg-do preprocess } */
2 /* { dg-options "-pedantic -std=gnu89" } */
3
4 /* You can't do this in your own code... */
5 // C++ comment is not in C89 { dg-warning "style comment|reported only once" "good warning" }
6
7 /* ...but we don't bitch about it more than once. */
8 // C++ comment is not in C89 { dg-bogus "style comment" "bad warning" }
9
10 /*
11 { dg-final { if ![file exists cxx-comments-1.i] { return } } }
12 { dg-final { set tmp [grep cxx-comments-1.i "is not in C89" line] } }
13 { dg-final { # send_user "$tmp\n" } }
14 { dg-final { if [regexp "is not in C89" $tmp] \{ } }
15 { dg-final { fail "cxx-comments-1: comment strip check" } }
16 { dg-final { \} else \{ } }
17 { dg-final { pass "cxx-comments-1: comment strip check" } }
18 { dg-final { \} } }
19 */
20
This page took 0.042287 seconds and 5 git commands to generate.