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 middle-end/16693] [3.4/3.5 regression] Bitwise AND is lost when used within a cast to an enum of the same precision


------- 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


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