8sa1-gcc/gcc/testsuite/gcc.dg/cpp/paste11.c
Neil Booth 9f6ef6bcaf defined.c, [...]: New tests.
* gcc.dg/cpp/defined.c, include1.c, paste11.c, skipping.c:
	New tests.
	* gcc.dg/cpp/macsyntx.c: Move test to defined.c.
	* gcc.dg/cpp/mi3.c, mi3.h: New test for over-enthusiastic
	optimisation.

From-SVN: r37126
2000-10-29 17:43:57 +00:00

16 lines
582 B
C

/* Copyright (C) 2000 Free Software Foundation, Inc. */
/* { dg-do preprocess } */
/* Test correct pasting of identifiers and numbers. We can paste any
number, as long as no '.', '-' or '+' appears in its spelling. */
#define glue(x, y) x ## y
glue (ident, 12) /* OK. */
glue (ident, 12e3) /* OK. */
glue (ident, 12e+3) /* { dg-warning "valid preprocessing tok" } */
glue (ident, 12e-3) /* { dg-warning "valid preprocessing tok" } */
glue (ident, 1.2) /* { dg-warning "valid preprocessing tok" } */
glue (ident, .12) /* { dg-warning "valid preprocessing tok" } */