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

           Summary: Clang incorrectly warns of undefined behavior with
                    printf specifier %#X
           Product: clang
           Version: unspecified
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Attempting to compile the following line of code:

    printf("%#X\n", 50);

results in a spurious warning:

foo.c:4:14: warning: flag '#' results in undefined behavior with 'X' conversion
      specifier [-Wformat]
    printf("%#X\n", 50);
            ~^~

This is incorrect. The '#' flag applies to 'X' just as well as it does to 'x'.

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