From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14271 invoked by alias); 18 Jan 2015 22:54:07 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 14138 invoked by uid 48); 18 Jan 2015 22:54:02 -0000 From: "harald at gigawatt dot nl" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/64644] "warning: anonymous union with no members" should be an error with -pedantic-errors Date: Sun, 18 Jan 2015 22:54:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: harald at gigawatt dot nl X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg01769.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64644 --- Comment #2 from Harald van Dijk --- Yep, thanks, testing that on 4.9.2 seems to give the right results. I see it covered by existing tests in at least gcc/testsuite/g++.old-deja/g++.law/union4.C and gcc/testsuite/g++.old-deja/g++.law/union4.C. I'll re-test with GCC 5 soonish (later in the week, probably), change dg-warning to dg-error where appropriate, and check if there's already a test to make sure it remains a warning without -pedantic-errors. A question, though: I see that like many other existing warnings, this doesn't handle -Werror=pedantic. Is that something that should be addressed as well, or is that something that should at some later point be handled for all relevant warnings at once?