[LLVMbugs] [Bug 7494] New: False positive in branch/while loop
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jun 25 11:43:04 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7494
Summary: False positive in branch/while loop
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
AssignedTo: kremenek at apple.com
ReportedBy: simon at sxw.org.uk
CC: llvmbugs at cs.uiuc.edu
The following test:
extern void dummy(int a);
void
test(int a, int b) {
int c;
if (a != b) {
while(a != b) {
c = a;
a = b;
}
dummy(c);
}
}
Reports:
/Users/sxw/checker-242/libexec/ccc-analyzer -c -o test.o test.c
test.c:12:9: warning: Pass-by-value argument in function call is undefined
dummy(c);
^ ~
1 warning generated.
But for the call to dummy to be reached, c must be defined.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list