8sa1-gcc/gcc/testsuite/gcc.dg/cpp/if-4.c
Neil Booth 74f215d7e0 19960224-2.c, [...]: Update tests for new diagnostic messages.
* gcc.dg/cpp/19960224-2.c, 20000625-2.c, cxxcom2.c, directiv.c,
	endif.c, if-4.c, if-5.c, if-mop.c, macsyntx.c, paste2.c, paste6.c,
	paste8.c, redef2.c, strify2.c, strp1.c, tr-warn1.c, tr-warn3.c,
	tr-warn6.c, undef1.c, undef2.c, widestr1.c: Update tests for
	new diagnostic messages.

	* gcc.dg/cpp/macro3.c: New tests.

From-SVN: r37099
2000-10-28 18:01:40 +00:00

9 lines
238 B
C

/* Regression test for proper error message. The token name isn't
NUL terminated, so we would print garbage after it. */
/* { dg-do compile } */
#if 1 += 2 /* { dg-error "is not valid" "+= in if" } */
syntax_error
#endif
int foo;