Clean up some minor white space issues in trans-decl.c and trans-expr.c
[official-gcc.git] / gcc / testsuite / g++.dg / ext / selectany2.C
blob7d4aea01e8798a7a84cd42fc24d39c461e0a71e5
1 // { dg-do compile { target i?86-pc-cygwin } }
2 // { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } }
4 // Check for errors with invalid usage of selectany attribute.
6 extern int foo;
7 __declspec (selectany) int foo = 1;  // OK
9 struct d
11   static int foo;
13 __declspec (selectany) int d::foo = 1;  // OK 
15 struct  f
17   int i;
19 __declspec (selectany) struct f  F= {1}; // OK
21 __declspec (selectany) int boo; //  OK
23 __declspec (selectany) static int bar = 1; // { dg-error "selectany" }
24 int use_bar = bar;  //  Avoid defined but not used warning. 
26 int baz()
28   __declspec (selectany)  int foo = 1;  // { dg-error "selectany" }
29   return foo;