diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/trad/strify.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/trad/strify.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/strify.c b/gcc/testsuite/gcc.dg/cpp/trad/strify.c new file mode 100644 index 000000000..d97a43970 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/trad/strify.c @@ -0,0 +1,18 @@ +/* Test whether traditional stringify works. */ +/* { dg-do run } */ + +#define foo(a, b) c="a"; d="b"; + +extern void abort (); +extern void exit (int); + +int main () +{ + char *c, *d; + + foo (p,q); + if (c[0] != 'p' || d[0] != 'q') + abort (); + + exit (0); +} |