This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15069] a bit test on a variable of enum type is miscompiled
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Apr 2004 15:58:21 -0000
- Subject: [Bug c++/15069] a bit test on a variable of enum type is miscompiled
- References: <20040422125216.15069.bruno@clisp.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-22 15:58 -------
Yes I am correct in that you are invoking undefined behavior as direction_t can only have values
between 0 and 5 because C++ rules are different than C. In C enum types have the same size of the
underlining type but C++ is different in that respect.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15069