Debian Codegraph @

gcc/testsuite/g++.dg/ext/flex-array-counted-by-2.C

raw
1 /* Testing the fact that the attribute counted_by is not supported in C++. */
2 /* { dg-do compile { target c++11 } } */
3 /* { dg-options "-Wattributes" } */
4
5 struct trailing {
6 int count;
7 int field [[gnu::counted_by (count)]] []; /* { dg-warning "attribute is not supported for C\\+\\+ for now, ignored" } */
8 };
9
10 struct trailing1 {
11 int count1;
12 [[gnu::counted_by (count)]] int field []; /* { dg-warning "attribute is not supported for C\\+\\+ for now, ignored" } */
13 };