Debian Codegraph @

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

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