PR c++/71290 - Flexible array member is not diagnosed with -pedantic
authorMartin Sebor <msebor@redhat.com>
Wed, 25 Jan 2017 23:11:53 +0000 (23:11 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Wed, 25 Jan 2017 23:11:53 +0000 (16:11 -0700)
commit58feaa5f529ef7c5afec8f6f323d7bcf596313a4
tree30c2ef8b24d6ce50fc021a738a786fe04f4800df
parenta25608aa6fc14c49fb23247f60c5f83225d00c29
PR c++/71290 - Flexible array member is not diagnosed with -pedantic

gcc/cp/ChangeLog:
PR c++/71290
* decl.c (grokdeclarator): Warn on flexible array members.

gcc/testsuite/ChangeLog:
PR c++/71290
* g++.dg/ext/flexarray-mangle-2.C: Adjust.
* g++.dg/ext/flexarray-mangle.C: Same.
* g++.dg/ext/flexarray-subst.C: Same.
* g++.dg/ext/flexary10.C: Same.
* g++.dg/ext/flexary11.C: Same.
* g++.dg/ext/flexary14.C: Same.
* g++.dg/ext/flexary16.C: Same.
* g++.dg/ext/flexary18.C: Same.
* g++.dg/ext/flexary19.C: Same.
* g++.dg/ext/flexary7.C: Same.
* gcc/testsuite/g++.dg/cpp1z/has-unique-obj-representations1.C: Same.
* gcc/testsuite/g++.dg/ubsan/object-size-1.C: Same.
* gcc/testsuite/obj-c++.dg/property/at-property-23.mm: Same.

From-SVN: r244910
16 files changed:
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/g++.dg/cpp1z/has-unique-obj-representations1.C
gcc/testsuite/g++.dg/ext/flexarray-mangle-2.C
gcc/testsuite/g++.dg/ext/flexarray-mangle.C
gcc/testsuite/g++.dg/ext/flexarray-subst.C
gcc/testsuite/g++.dg/ext/flexary10.C
gcc/testsuite/g++.dg/ext/flexary11.C
gcc/testsuite/g++.dg/ext/flexary14.C
gcc/testsuite/g++.dg/ext/flexary16.C
gcc/testsuite/g++.dg/ext/flexary18.C
gcc/testsuite/g++.dg/ext/flexary19.C
gcc/testsuite/g++.dg/ext/flexary7.C
gcc/testsuite/g++.dg/ext/pr71290.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ubsan/object-size-1.C
gcc/testsuite/obj-c++.dg/property/at-property-23.mm