[LLVMbugs] [Bug 15099] New: warning vs error for character literal overflow

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jan 28 17:42:16 PST 2013


             Bug #: 15099
           Summary: warning vs error for character literal overflow
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rkotler at mips.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This code generates a warning for g++ and an error for clang++

rkotler at ubuntu-rkotler:~/testmips16/hf$  ~/llvm_3_2/install/bin/clang++ tl1.cpp
tl1.cpp:2:7: error: character too large for enclosing character literal type
  if ('\u4444' == 0) {
1 error generated.
rkotler at ubuntu-rkotler:~/testmips16/hf$ g++ -S tl1.cpp
tl1.cpp:2:7: warning: multi-character character constant
rkotler at ubuntu-rkotler:~/testmips16/hf$

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