https://llvm.org/bugs/show_bug.cgi?id=23412

            Bug ID: 23412
           Summary: -Wformat warns when using format specifier macros from
                    MS headers
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

For example:

#include <inttypes.h>
#include <stdio.h>

void f(uint32_t i) {
    printf("%" PRIx32 "\n", i);
}

Generates this:

d:\src\tmp\a.c:5:26: warning: format specifies type 'unsigned long' but the
      argument has type 'uint32_t' (aka 'unsigned int') [-Wformat]
        printf("%" PRIx32 "\n", i);
                ~~~             ^
1 warning generated.


It seems 32-bit format specifier macros are prefixed with 'l' in the Visual
Studio headers.

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