This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/50559] g++ bails out after seeing overflow in an enumeration value


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

Daniel KrÃgler <daniel.kruegler at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.kruegler at
                   |                            |googlemail dot com

--- Comment #4 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> 2011-09-28 17:54:55 UTC ---
(In reply to comment #3)
> Reduced testcase:

Just to be sure: Is this testcase rejected? If so, this seems in violation to
the C++(03) standard based on 7.2 p4:

"[..] Otherwise the type is the same as the type of the initializing value of
the preceding enumerator unless the incremented value is not representable in
that type, in which case the type is an unspecified integral type sufficient to
contain the incremented value."

The discussed enumeration should fit when the underlying type would be unsigned
long.

Please ignore this comment, if my preconditions are not satisfied ;-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]