re PR c++/64644 ("warning: anonymous union with no members" should be an error with...
authorManuel López-Ibáñez <manu@gcc.gnu.org>
Fri, 15 Sep 2017 19:22:35 +0000 (19:22 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 15 Sep 2017 19:22:35 +0000 (19:22 +0000)
commitc01df3c86f72656e44ec1952b4e8019961ed7a4a
treed7b3d9d98a3f57cfbabaddeef8fe87934bfe6ae0
parent39ebef2cf14836141586d27e7b9c2660ab5490b1
re PR c++/64644 ("warning: anonymous union with no members" should be an error with -pedantic-errors)

/cp
2017-09-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
    Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/64644
* decl2.c (finish_anon_union): Complain about "anonymous union with
no members" with a pedwarn.

/testsuite
2017-09-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
    Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/64644
* g++.dg/other/anon-union4.C: New.
* g++.old-deja/g++.law/union4.C: Adjust.
* g++.old-deja/g++.other/anon1.C: Likewise.

Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>
From-SVN: r252835
gcc/cp/ChangeLog
gcc/cp/decl2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/anon-union4.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.law/union4.C
gcc/testsuite/g++.old-deja/g++.other/anon1.C