[cfe-dev] test/Sema/typedef-redef.c failure

Ted Kremenek kremenek at apple.com
Thu Jun 19 16:33:53 PDT 2008


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:

> Hi,
>
> 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').
>
> Nuno
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list