aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/paste11.c
blob: 18530b3448ad64fc23d547c3f2cffb8973c2f967 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* 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" } */