public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/48536] New: C++0x Automatic Enumerator Incrementation is not compliant with Clause 7.2/5
@ 2011-04-09 22:11 shaw.john.r at gmail dot com
  2011-05-03 20:00 ` [Bug c++/48536] " redi at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: shaw.john.r at gmail dot com @ 2011-04-09 22:11 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48536

           Summary: C++0x Automatic Enumerator Incrementation is not
                    compliant with Clause 7.2/5
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: shaw.john.r@gmail.com


The enumerations defined below are well-formed C++0x, but g++, with C++0x
extensions enabled, still treats #1 as an overflow error.

Note: Comeau C/C++ 4.3.10.1 with C++0x extensions enabled reports no errors.

#include <climits>
//
// g++ version 4.5.2 and below
//
// Compiler options:
//    -std=c++0x
//    -std=gnu++0x
// non-compliant error message:
//    "error: overflow in enumeration values"
//
// According to C++ draft N1905 (2005) and above / Clause 7.2/5
// The following enumeration is well-formed.
//
enum Enum_Inc  { EI_1=UINT_MAX, EI_2 }; // #1

// The above should be equivalent to the following
enum Enum_Inc2 { FI_1=UINT_MAX, FI_2=FI_1+1 }; // #2


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

end of thread, other threads:[~2011-09-28 18:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-09 22:11 [Bug c++/48536] New: C++0x Automatic Enumerator Incrementation is not compliant with Clause 7.2/5 shaw.john.r at gmail dot com
2011-05-03 20:00 ` [Bug c++/48536] " redi at gcc dot gnu.org
2011-05-03 20:38 ` jason at gcc dot gnu.org
2011-05-25 22:12 ` [Bug c++/48536] [C++0x] " jason at gcc dot gnu.org
2011-05-26  3:07 ` jason at gcc dot gnu.org
2011-05-26  3:09 ` jason at gcc dot gnu.org
2011-09-28 18:31 ` redi 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).