[LLVMbugs] [Bug 19961] New: Clang does not define __INTPTR_MAX__

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 5 14:27:18 PDT 2014


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

            Bug ID: 19961
           Summary: Clang does not define __INTPTR_MAX__
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: binji at chromium.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

__INTPTR_MAX__ is used by newlib (in stdint.h) if __INTPTR_TYPE__ is defined:

  #ifdef __INTPTR_TYPE__
  #define INTPTR_MIN (-__INTPTR_MAX__ - 1)
  #define INTPTR_MAX __INTPTR_MAX__
  #define UINTPTR_MAX __UINTPTR_MAX__
  #elif defined(__PTRDIFF_TYPE__)
  ...

GCC defines __INTPTR_TYPE__ and __INTPTR_MAX__, but Clang only defines
__INTPTR_TYPE__, so using INTPTR_{MIN,MAX} produces an undefined symbol error.

Newlib could be fixed here, but it might be nicer to match GCC's predefined
macros.

-- 
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/20140605/2c5addd3/attachment.html>


More information about the llvm-bugs mailing list