Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/ext/pr71290.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 |
---|---|
1 // PR c++/71290 - [6/7 Regression] Flexible array member is not diagnosed | 1 // PR c++/71290 - [6/7 Regression] Flexible array member is not diagnosed |
2 // with -pedantic | 2 // with -pedantic |
3 | 3 |
4 // { dg-do compile }s | 4 // { dg-do compile } |
5 // { dg-options "-Wall -Wpedantic" } | 5 // { dg-options "-Wall -Wpedantic" } |
6 | 6 |
7 struct A | 7 struct A |
8 { | 8 { |
9 int i; | 9 int i; |
10 int arr[]; // { dg-warning "forbids flexible array member .arr." } | 10 int arr[]; // { dg-warning "7:ISO C\\+\\+ forbids flexible array member .arr." } |
11 }; | 11 }; |
12 | 12 |
13 template <class T> | 13 template <class T> |
14 struct B { | 14 struct B { |
15 T n; | 15 T n; |
16 T a[]; // { dg-warning "forbids flexible array member .a." } | 16 T a[]; // { dg-warning "5:ISO C\\+\\+ forbids flexible array member .a." } |
17 }; | 17 }; |