[LLVMbugs] [Bug 10391] New: 'nullptr' in C++03 mode is a macro that violates assumptions

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jul 18 09:38:56 PDT 2011


           Summary: 'nullptr' in C++03 mode is a macro that violates
           Product: libc++
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
        AssignedTo: hhinnant at apple.com
        ReportedBy: scshunt at csclub.uwaterloo.ca
                CC: llvmbugs at cs.uiuc.edu

When compiler 'nullptr' support is not available, 'nullptr' is defined as a
macro, and this is visible in user code. As a consequence, this makes valid use
of 'nullptr' illegal as well as violating a few critical assumptions since it
doesn't behave as a true 'nullptr_t' would. In particular,
'reinterpret_cast<ptrdiff_t>(nullptr)' does not work, and a test for this
behavior fails as a result.

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