diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/paste4.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/paste4.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/paste4.c b/gcc/testsuite/gcc.dg/cpp/paste4.c new file mode 100644 index 00000000000..fac1d436ffe --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/paste4.c @@ -0,0 +1,14 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. */ +/* { dg-do compile } */ + +/* Since 1.0e and + form the pasted token, 1 is a separate token and + so should be output with a preceding space. The old preprocessor + gets this wrong. */ + +#define glue(x, y) x ## y + +int main () +{ + double d = glue (1.0e, +1); /* { dg-error "floating const|parse error" } */ + return 0; +} |