[LLVMbugs] [Bug 3248] New: Operand of sizeof(vla) not evaluated
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sat Dec 20 21:29:56 PST 2008
http://llvm.org/bugs/show_bug.cgi?id=3248
Summary: Operand of sizeof(vla) not evaluated
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: LLVM Codegen
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: sharparrow1 at yahoo.com
CC: llvmbugs at cs.uiuc.edu
Testcase:
int a(int x) {int a, (*y)[x]; return sizeof(*(puts("asdf"),y));}
The emitted IL should have a call to puts, but the call isn't emitted in clang.
Per C99 6.5.3.4p2, "If the type of the operand [of a sizeof] is a variable
length array type, the operand is evaluated; otherwise, the operand is not
evaluated and the result is an integer constant."
--
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