This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50559] g++ bails out after seeing overflow in an enumeration value
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 28 Sep 2011 17:54:55 +0000
- Subject: [Bug c++/50559] g++ bails out after seeing overflow in an enumeration value
- Auto-submitted: auto-generated
- References: <bug-50559-4@http.gcc.gnu.org/bugzilla/>
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 ;-)