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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to