Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/gen-attrs-81.C

raw
1 // { dg-do compile { target c++11 } }
2
3 void
4 foo (int n)
5 {
6 auto a = new int [n] [[gnu::deprecated]]; // { dg-warning "attributes ignored on outermost array type in new expression" }
7 auto b = new int [n] [[gnu::deprecated]] [42] [[]] [1] [[]]; // { dg-warning "attributes ignored on outermost array type in new expression" }
8 auto c = new int [n] [[]] [42] [[gnu::deprecated]] [1] [[gnu::deprecated]];
9 delete[] b;
10 delete[] a;
11 }