[cfe-dev] Errors building clang with FSF gcc trunk

Chris Lattner clattner at apple.com
Mon Mar 10 10:09:16 PDT 2008


On Mar 10, 2008, at 9:53 AM, Shantonu Sen wrote:
> I'm not sure if it's more strict, or the libstdc++ headers have  
> changed, or what, but the following errors occur:

I think that they did a cleanup of the libstdc++ headers to make them  
#include less.  I agree with you that the clang source should include  
hte headers it needs, not relying on an artifact of the libstdc++  
implementation.

> ...
> GRSimpleVals.cpp:33: error: explicit template specialization cannot  
> have a storage class
> GRSimpleVals.cpp:55: error: explicit template specialization cannot  
> have a storage class
> ...
>
> Attached is a patch for all but the GRSimpleVals.cpp issue. Removing  
> "static" fixes it, but I'm not really sure what the error is really  
> trying to convey.

I think your patch is right, thanks.

> For the other cases, the source files do indeed use those functions  
> without explicitly including <string.h> or <iostream>, and it seems  
> bad to rely on side effects of other headers, even if it used to  
> work before.

I applied both changes.  The only change I made was to turn <string.h>  
-> <cstring>, which is the functionally equivalent but more C++'y  
version of the header.

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080310/004642.html
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080310/004643.html

Thanks Shantonu!

-Chris



More information about the cfe-dev mailing list