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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to