[LLVMbugs] [Bug 4172] New: false positive: Branch condition evaluates to an uninitialized value
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Thu May 7 07:17:27 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4172
Summary: false positive: Branch condition evaluates to an
uninitialized value
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: dimhen at gmail.com
CC: llvmbugs at cs.uiuc.edu
scan-build gcc -Wall -O3 tst.c
produce
ANALYZE: tst.c foo
tst.c:15:5: warning: Branch condition evaluates to an uninitialized value.
if(k==0)
^ ~
1 diagnostic generated.
scan-build: 1 bugs found.
I use rev. #71157
#pr -n tst.c
1 struct blob {
2 int n;
3 void *p;
4 } B;
5
6 extern void bar(struct blob*);
7
8 int foo(void)
9 {
10 int k;
11 B.n = sizeof(k);
12 B.p = (void*) &k;
13 bar(&B);
14
15 if(k==0)
16 return 0;
17 else
18 return 1;
19 }
--
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