[Bug middle-end/16693] [3.4/3.5 regression] Bitwise AND is lost when used within a cast to an enum of the same precision

rearnsha at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Aug 20 09:33:00 GMT 2004


------- Additional Comments From rearnsha at gcc dot gnu dot org  2004-08-20 09:33 -------
The bitwise and is applied to something that isn't an enumerated type (it's
wider than that), and it's whole purpose is to reduce the value to something
that then *can* be cast to the enumerated type.

It's not as if the user had written


0xf & static_cast<Test_Enum>(ret6666(44));

Which would be incorrect.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mmitchel at gcc dot gnu dot
                   |                            |org
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16693



More information about the Gcc-bugs mailing list