This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch Ping] PR 64644 (""warning: anonymous union with no members" should be an error with -pedantic-errors")
- From: Nathan Sidwell <nathan at acm dot org>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: Jason Merrill <jason at redhat dot com>
- Date: Fri, 15 Sep 2017 11:59:52 -0400
- Subject: Re: [C++ Patch Ping] PR 64644 (""warning: anonymous union with no members" should be an error with -pedantic-errors")
- Authentication-results: sourceware.org; auth=none
- References: <6eeb9ea6-4b55-99be-06d4-aa141df2f9f2@oracle.com> <e3bef9aa-ab5c-2b15-d858-b6dd5506f5b7@oracle.com>
On 09/15/2017 05:53 AM, Paolo Carlini wrote:
Hi,
gently pinging this.
On 16/06/2017 15:47, Paolo Carlini wrote:
Hi,
submitter and Manuel analyzed this a while ago and came to the
conclusion - which I think is still valid vs the current working draft
- that strictly speaking this kind of code violates [dcl.dcl], thus a
pedwarn seems more suited than a plain warning. The below one-liner,
suggested by Manuel at the time, passes testing on x86_64-linux
together with my testsuite changes.
https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01193.html
Ok. class.union.anon has the member-specification as non-optional.
nathan
--
Nathan Sidwell