FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / gcc.dg / cpp / cmdlne-C2.c
blob13f5a0953b86d47a171a269144426bbab1514e72
1 /* Copyright (C) 2000, 2001 Free Software Foundation, Inc. */
3 /* { dg-do preprocess } */
4 /* { dg-options "-C" } */
6 /* This tests that C++ comments are either dropped, or converted to C
7 comments in macro expansions. The + in the regexp stops it from
8 matching itself 8-)
10 Neil Booth, 9 Oct 2001. */
12 #define ZERO 0 // A comment
14 ZERO:
17 { dg-final { if ![file exists cmdlne-C2.i] { return } } }
18 { dg-final { if { [grep cmdlne-C2.i "c+omment:"] == "" } { return } } }
19 { dg-final { fail "cmdlne-C2.i: C++ comments in macros with -C" } }