[LLVMbugs] [Bug 17684] New: clang and analyzer don't complain about implicit enum to integer conversion even with -Weverything -Wenum-conversion
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Oct 24 07:01:20 PDT 2013
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: kremenek at apple.com
Reporter: mayer.julian at googlemail.com
CC: llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131024/3c3ae29f/attachment.html>
More information about the llvm-bugs
mailing list