public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/67048] New: GCC rejects well-formed program using empty anonymous enum specifier in a variable declaration
@ 2015-07-29  3:15 anders.granlund.0 at gmail dot com
  2015-07-29  9:24 ` [Bug c++/67048] " redi at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: anders.granlund.0 at gmail dot com @ 2015-07-29  3:15 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-03-07 17:42 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-29  3:15 [Bug c++/67048] New: GCC rejects well-formed program using empty anonymous enum specifier in a variable declaration anders.granlund.0 at gmail dot com
2015-07-29  9:24 ` [Bug c++/67048] " redi at gcc dot gnu.org
2021-08-04 22:07 ` [Bug c++/67048] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
2022-01-17 15:18 ` rguenth at gcc dot gnu.org
2022-01-31 15:27 ` marxin at gcc dot gnu.org
2022-04-28 20:14 ` [Bug c++/67048] [9/10/11/12/13 " mpolacek at gcc dot gnu.org
2022-04-29 19:08 ` cvs-commit at gcc dot gnu.org
2022-04-29 19:09 ` [Bug c++/67048] [9/10/11/12 " mpolacek at gcc dot gnu.org
2022-05-27  9:35 ` [Bug c++/67048] [10/11/12 " rguenth at gcc dot gnu.org
2022-06-28 10:31 ` jakub at gcc dot gnu.org
2022-08-12  8:11 ` cvs-commit at gcc dot gnu.org
2023-03-07 17:42 ` [Bug c++/67048] [10/11 " mpolacek at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).