Commit 66cb3475 by Neil Booth

*** empty log message ***

From-SVN: r37101
parent e7f7ca12
...@@ -14,6 +14,10 @@ extern void abort (void); ...@@ -14,6 +14,10 @@ extern void abort (void);
#define xstr(x) str(x) #define xstr(x) str(x)
#define strvar(...) #__VA_ARGS__ #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[]) int main (int argc, char *argv[])
{ {
str (\); /* { dg-warning "valid string" "str(\\)" } */ str (\); /* { dg-warning "valid string" "str(\\)" } */
...@@ -45,5 +49,8 @@ int main (int argc, char *argv[]) ...@@ -45,5 +49,8 @@ int main (int argc, char *argv[])
if (strcmp (strvar (foo, bar), "foo, bar")) if (strcmp (strvar (foo, bar), "foo, bar"))
err ("variable arguments"); err ("variable arguments");
if (strcmp (glibc_str (ver), "GLIBC_2.2"))
err ("whitespace");
return 0; return 0;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment