Clang's tautological-constant-out-of-range-compare warnings seem broken. It'll warn on enum values, even though they could have casted...
@taradinoc So it warned on "enum < 64", even though it was not using some magical hardware 6-bit type for future operations.
-
-
@cmuratori Such warnings tell you that your program may work unexpectedly on SOME conforming compiler, not necessarily the one you're using. -
@taradinoc No, it does not tell you that at all. There is no case where this comparison will result in unexpected behavior of the program. - Show replies
New conversation -
-
-
@cmuratori For example, GCC with -fstrict-enums may do optimizations that eliminate your tests, by assuming your enums are always in range. -
@taradinoc That is fine in an optimized build but not in a debug build, and if the compiler did that with no option to turn it off... - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.