[LLVMbugs] [Bug 1858] -warn-uninit-values sizeof() handling wrong
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Thu Dec 13 16:49:40 PST 2007
http://llvm.org/bugs/show_bug.cgi?id=1858
Ted Kremenek <kremenek at cs.stanford.edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|CLOSED |REOPENED
Resolution|FIXED |
--- Comment #3 from Ted Kremenek <kremenek at cs.stanford.edu> 2007-12-13 18:49:39 ---
Special care must be taken for VLAs where the sizeof can actual cause its
subexpression to be evaluated.
For example:
int bar() {
printf("World\n");
return 5;
}
int f() {
printf("Hello\n");
return 3;
}
main() {
typedef int a[f()];
return sizeof (a[bar()]);
}
The output of this program is:
Hello
World
--
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