aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/paste11.c
diff options
context:
space:
mode:
authorNeil Booth <neilb@earthling.net>2000-10-29 17:43:57 +0000
committerNeil Booth <neil@gcc.gnu.org>2000-10-29 17:43:57 +0000
commit9f6ef6bcaf5716524e0b97c9ae07cdb885858cf3 (patch)
tree866bc0a0d9329f355ba4833ecdfb5908e7e5b5e4 /gcc/testsuite/gcc.dg/cpp/paste11.c
parent8c7b74b9393310aa17ef1c4360f0375a882b2500 (diff)
downloadgcc-9f6ef6bcaf5716524e0b97c9ae07cdb885858cf3.zip
gcc-9f6ef6bcaf5716524e0b97c9ae07cdb885858cf3.tar.gz
gcc-9f6ef6bcaf5716524e0b97c9ae07cdb885858cf3.tar.bz2
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
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/paste11.c')
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste11.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/paste11.c b/gcc/testsuite/gcc.dg/cpp/paste11.c
new file mode 100644
index 0000000..18530b3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/paste11.c
@@ -0,0 +1,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" } */