From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44522 invoked by alias); 29 Jul 2015 03:15:32 -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 44476 invoked by uid 48); 29 Jul 2015 03:15:27 -0000 From: "anders.granlund.0 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/67048] New: GCC rejects well-formed program using empty anonymous enum specifier in a variable declaration Date: Wed, 29 Jul 2015 03:15:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: anders.granlund.0 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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-07/txt/msg02482.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67048 Bug ID: 67048 Summary: GCC rejects well-formed program using empty anonymous enum specifier in a variable declaration Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: anders.granlund.0 at gmail dot com Target Milestone: --- Consider the following well-formed program (prog.cc): enum {} x; int main() {} Compile it with the following command line: g++ prog.cc -std=c++14 -pedantic-errors The following error message is given. I expected to get no error messages since the program is well-formed. prog.cc:1:6: error: ISO C++ forbids empty anonymous enum [-Wpedantic] enum {} x; ^ I have tried this with gcc HEAD 6.0.0 20150728 here: http://melpon.org/wandbox/permlink/BXXfLL4WOU5lBOfk