aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/macro4.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/macro4.c')
-rw-r--r--gcc/testsuite/gcc.dg/cpp/macro4.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/macro4.c b/gcc/testsuite/gcc.dg/cpp/macro4.c
index c0dfe41..ceaf8dd 100644
--- a/gcc/testsuite/gcc.dg/cpp/macro4.c
+++ b/gcc/testsuite/gcc.dg/cpp/macro4.c
@@ -1,24 +1,13 @@
/* Copyright (C) 2000 Free Software Foundation, Inc. */
-/* { dg-do run } */
+/* { dg-do preprocess } */
-/* Test source Neil Booth. GCC <= 2.96 don't get this right. */
-
-extern void abort (void);
-
-int glue (int x, int y)
-{
- return x + y;
-}
+/* Test source Neil Booth. */
#define glue(x, y) x ## y
#define xglue(x, y) glue (x, y)
-int main ()
-{
- /* Should expand to glue (1, 2) as the second "glue" is nested. */
- if (glue (xgl, ue) (1, 2) != 3)
- abort ();
-
- return 0;
-}
+/* Should expand to glue (1, 2), then 12. */
+#if glue (xgl, ue) (1, 2) != 12
+#error glue macro
+#endif