-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
Code Generation Tools
-
CODEGEN-13376
-
-
-
default
-
Change the enum to a C enum instead of a C++11 scoped enum, or change the switch statement to a tree of if statements.
If the user's code has a switch statement with a controlling expression which is a C++11 scoped enum type with an unsigned underlying type smaller than int, and any of the values of the scoped enum have the high bit set, the compiler may produce incorrect code for the switch statement.
It is possible for this bug to occur at any level of optimization, but it is more likely to occur when the optimizer is not used (-Ooff).