[LLVMbugs] [Bug 20064] New: "hex sequence out of range" error prevents valid code from building

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jun 17 01:26:45 PDT 2014


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

            Bug ID: 20064
           Summary: "hex sequence out of range" error prevents valid code
                    from building
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: bero at lindev.ch
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This piece of code fails to build with clang:

memcmp(magic,"\xFD7z",3);

clang (correctly) complains about "\xFD7" being a hex escape sequence out of
range -- but there is no "\xFD7" sequence involved here - what the code means
(and what gcc takes it to mean) is check for \xFD followed by the string 7z.

Probably the error should be downgraded to a warning because it's entirely
possible that someone actually meant "\xFD7" to be a 0xfd7 hex sequence - but
it should do what the code means to do anyway.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140617/7a51e213/attachment.html>


More information about the llvm-bugs mailing list