42)));// expected-error {{'section' attribute requires a string}}
// PR6007
voidtest(){
__attribute__((section("NEAR,x")))intn1;// expected-error {{'section' attribute only applies to functions, global variables, Objective-C methods, and Objective-C properties}}
__attribute__((section("NEAR,x")))staticintn2;// ok.
}
// pr9356
void__attribute__((section("foo")))test2();// expected-note {{previous attribute is here}}
void__attribute__((section("bar")))test2(){}// expected-warning {{section does not match previous declaration}}
enum__attribute__((section("NEAR,x")))e{one};// expected-error {{'section' attribute only applies to}}
externinta;// expected-note {{previous declaration is here}}
int*b=&a;
externinta__attribute__((section("foo,zed")));// expected-warning {{section attribute is specified on redeclared variable}}
constintconst_global_var__attribute__((section("template_fn1")))=42;// expected-error {{'const_global_var' causes a section type conflict with 'template_fn1'}}
template<typename>__attribute__((section("template_fn2")))voidtemplate_fn2(){}// expected-error {{'template_fn2' causes a section type conflict with 'mut_global_var'}}