Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/ext/flexary16.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
10 unsigned u; | 10 unsigned u; |
11 }; | 11 }; |
12 | 12 |
13 struct incomplete { | 13 struct incomplete { |
14 int x; | 14 int x; |
15 elem array[]; // { dg-warning "forbids flexible array member" } | 15 elem array[]; // { dg-warning "10:ISO C\\+\\+ forbids flexible array member" } |
16 }; | 16 }; |
17 }; | 17 }; |
18 | 18 |
19 unsigned f (container<void>::incomplete* i) | 19 unsigned f (container<void>::incomplete* i) |
20 { | 20 { |
25 template <typename T> | 25 template <typename T> |
26 struct D: container<T> | 26 struct D: container<T> |
27 { | 27 { |
28 struct S { | 28 struct S { |
29 int x; | 29 int x; |
30 typename container<T>::elem array[]; // { dg-warning "forbids flexible array member" } | 30 typename container<T>::elem array[]; // { dg-warning "33:ISO C\\+\\+ forbids flexible array member" } |
31 }; | 31 }; |
32 }; | 32 }; |
33 | 33 |
34 | 34 |
35 unsigned g (D<void>::S *s) | 35 unsigned g (D<void>::S *s) |