http://llvm.org/bugs/show_bug.cgi?id=17684
Bug ID: 17684
Summary: clang and analyzer don't complain about implicit enum
to integer conversion even with -Weverything
-Wenum-conversion
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
neither clang nor the analyzer complain about implicit enum to integer
conversion even with -Weverything -Wenum-conversion …. this piece of code
compiles without warnings although i'd like to see a warning in the if(...)
line
typedef enum
{
MagicWithFairies = 10,
MagicWithoutFairies = 11
} MagicValue;
MagicValue foobar()
{
return MagicWithFairies;
}
void bla()
{
if (foobar() == 10) // should be (foobar() == MagicWithFairies) as the enum
can change
{
printf("bla");
}
}
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs