[cfe-dev] test/Sema/typedef-redef.c failure
nunoplopes at sapo.pt
Fri Jun 20 01:55:00 PDT 2008
No, I haven't patched the clang driver. I'm now using the CPATH environment
variable. Anyway clang was supposed to use its own stddef.h...
----- Original Message -----
> I'm not seeing this. Is /usr/lib/gcc/i686-oc-linue-gnu/4.1.2 included in
> the driver (clang.cpp) as a system header?
> For example, do you have a line like:
> // Fedora 8
> AddPath("/usr/lib/gcc/i386-redhat-linux/4.1.2/include", System,
> false, false, false, Headers);
> If you don't, stddef.h might not be included as a system header, although
> I'm not certain why clang would be able to find stddef.h.
> On Jun 19, 2008, at 3:17 PM, Nuno Lopes wrote:
>> Is anyone else seeing a failure in the Sema/typedef-redef.c test?
>> I'm getting this output:
>> $ clang -fsyntax-only test/Sema/typedef-redef.c
>> test/Sema/typedef-redef.c:4:23: error: redefinition of 'size_t'
>> typedef unsigned long size_t;
>> In file included from test/Sema/typedef-redef.c:3:
>> /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h:214:23: error:
>> previous definition is here
>> typedef __SIZE_TYPE__ size_t;
>> 2 diagnostics generated.
>> Notice that it is including gcc's stddef.h instead of clang's. (btw
>> __SIZE_TYPE__ is defined as 'long unsigned int').
More information about the cfe-dev