This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/56158] bad enum values computed by operator~ in ios_base.h
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 06 Feb 2013 15:59:51 +0000
- Subject: [Bug libstdc++/56158] bad enum values computed by operator~ in ios_base.h
- Auto-submitted: auto-generated
- References: <bug-56158-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56158
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-02-06 15:59:51 UTC ---
[dcl.enum]/7 "For an enumeration whose underlying type is fixed, the values of
the enumeration are the values of the underlying type."
Because the underlying type in 17.5.2.1.3 is fixed those operations cannot
create a value outside the range of the enumeration type. See "The underlying
type should be fixed" in
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3110.html