This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16693] [3.4/3.5 regression] Bitwise AND is lost when used within a cast to an enum of the same precision
- From: "paulg at chiark dot greenend dot org dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jul 2004 13:03:04 -0000
- Subject: [Bug c++/16693] [3.4/3.5 regression] Bitwise AND is lost when used within a cast to an enum of the same precision
- References: <20040723171525.16693.paulg@chiark.greenend.org.uk>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From paulg at chiark dot greenend dot org dot uk 2004-07-26 13:02 -------
A collegue has done some more investigation and come up with the following
additional constraints.
If the enum pushes into the top nibble then the problem does not occur.
A similar problem occurs with unsigned short where the problem occurs if the
enumeration fits into a byte.
If the target variable is an unsigned int rather than a unsigned char or short
the problem does not occur.
--
What |Removed |Added
----------------------------------------------------------------------------
Known to work|3.3.3 |3.3.3 3.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16693