No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gcc4 / gcc / testsuite / gcc.dg / cpp / strify3.c
blob5d76b5e750fb1b0e01b82512368f4a56fd42052f
1 /* Copyright (C) 2001 Free Software Foundation, Inc. */
3 /* { dg-do run } */
5 /* Tests we stringify without inserting a space. GCC 2.95.x and
6 earlier would insert a bogus space before bar in the string, simply
7 because a space was there in the invocation.
9 Neil Booth, 24 Sep 2001. */
11 extern int strcmp (const char *, const char *);
12 extern int puts (const char *);
13 extern void abort (void);
14 #define err(str) do { puts(str); abort(); } while (0)
16 #define str(x) #x
17 #define xstr(x) str(x)
18 #define glibc_hack(x, y) x@y
20 int main (int argc, char *argv[])
22 /* The space before "bar" here is vital. */
23 char a[] = xstr(glibc_hack(foo, bar));
25 if (strcmp (a, "foo@bar"))
26 err ("stringification without spaces");
28 return 0;