aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/DRs/dr2262.C
blob: 88b8a31e9620d7a4ad032f84415a31bb4d9768e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// DR 2262 - Attributes for asm-definition
// { dg-do compile { target c++11 } }
// { dg-options "-Wattributes" }

[[]] asm ("nop");
[[foo::bar]] asm ("nop");	// { dg-warning "attributes ignored on 'asm' declaration" }

void
foo ()
{
  int i = 42;
  [[]] asm ("nop");
  [[foo::bar]] asm ("nop");	// { dg-warning "attributes ignored on 'asm' declaration" }
  [[]] asm ("nop" : "+r" (i));
  [[foo::bar]] [[bar::baz]] asm ("nop" : "+r" (i));	// { dg-warning "attributes ignored on 'asm' declaration" }
}