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 libstdc++/56158] bad enum values computed by operator~ in ios_base.h


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


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