OSDN Git Service

* gcc.dg/cpp/ident-1.c: Add dg-options "".
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / cpp / strify2.c
index 18777bd..2c768dc 100644 (file)
@@ -1,7 +1,7 @@
 /* Copyright (C) 2000 Free Software Foundation, Inc.  */
 
 /* { dg-do run } */
-/* { dg-options "-std=c99 -pedantic-errors" } */
+/* { dg-options "-std=c99 -pedantic-errors -fno-show-column" } */
 
 /* Tests a whole bunch of things are correctly stringified.  */
 
@@ -14,6 +14,10 @@ extern void abort (void);
 #define xstr(x) str(x)
 #define strvar(...) #__VA_ARGS__
 
+#define glibc_str(x) glibc_str2 (w, x)
+#define glibc_str2(w, x) #x
+#define ver GLIBC_2.2
+
 int main (int argc, char *argv[])
 {
   str (\);             /* { dg-warning "valid string" "str(\\)" } */
@@ -45,5 +49,8 @@ int main (int argc, char *argv[])
   if (strcmp (strvar (foo, bar), "foo, bar"))
     err ("variable arguments");
 
+  if (strcmp (glibc_str (ver), "GLIBC_2.2"))
+    err ("whitespace");
+
   return 0;
 }