[LLVMbugs] [Bug 10909] New: On OSX 10.6, cinttypes doesn't define PRI* or SCN*

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Sep 11 10:13:27 PDT 2011


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

           Summary: On OSX 10.6, cinttypes doesn't define PRI* or SCN*
           Product: libc++
           Version: unspecified
          Platform: PC
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
        AssignedTo: hhinnant at apple.com
        ReportedBy: jyasskin at google.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=7251)
 --> (http://llvm.org/bugs/attachment.cgi?id=7251)
Define __STDC_FORMAT_MACROS before cinttypes includes inttypes.h

This manifests as the following error in the test suite:


cinttypes.pass.cpp:260:2: error: #error PRId8 not defined
#error PRId8 not defined
 ^
cinttypes.pass.cpp:264:2: error: #error PRId16 not defined
#error PRId16 not defined
 ^
...
cinttypes.pass.cpp failed to compile
failed 1 tests in
/Users/jyasskin/src/libcxx/trunk/test/input.output/file.streams/c.files


Here's a patch that fixes the problem, although it may not fix it correctly.

Other OS'es may need a similar fix for cstdint to define the INT_MAX macros
(C99 says __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS control this), but
10.6 doesn't.

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