[LLVMbugs] [Bug 2089] New: sizeof('a') in C++ is == 1 and in C == 4

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Feb 24 08:08:28 PST 2008


http://llvm.org/bugs/show_bug.cgi?id=2089

           Summary: sizeof('a') in C++ is == 1 and in C == 4
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: miscompilation
          Severity: normal
          Priority: P2
         Component: LLVM Codegen
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nunoplopes at sapo.pt
                CC: llvmbugs at cs.uiuc.edu


printf("sizeof('a') == %d\n", sizeof('a'));

should ouput 1 in C++, but 4 in C. Currently it outputs 4 for both languages.


-- 
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