[LLVMbugs] [Bug 14582] New: ptrdiff_t not defined when enable debug info

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Dec 11 21:27:04 PST 2012


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

             Bug #: 14582
           Summary: ptrdiff_t not defined when enable debug info
           Product: libc++
           Version: 3.2
          Platform: PC
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
        AssignedTo: hhinnant at apple.com
        ReportedBy: egmkang at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


1.cc:
#include <cstddef>

int main()
{
    size_t  a = 1;

    return 0;
}

compile 1.cc like:
clang++ -g -O0 -stdlib=libc++ 1.cc -D_LIBCPP_DEBUG2=1

and you can get some errors like:

In file included from 1.cc:1:
In file included from /usr/include/c++/v1/cstddef:36:
In file included from /usr/include/c++/v1/__config:439:
/usr/include/c++/v1/__debug:171:43: error: unknown type name 'ptrdiff_t'; did
you mean '__ptrdiff_t'?
    bool __subscriptable(const void* __i, ptrdiff_t __n) const;
                                          ^
/usr/include/machine/_types.h:78:19: note: '__ptrdiff_t' declared here
typedef __int64_t       __ptrdiff_t;            /* ptr1 - ptr2 */
                        ^

freebsd version: 9.1-RC3
clang version: 3.2(installed from ports)

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