[cfe-dev] ccache + clang warnings that are suppressed during macro expansion

Chris Lattner clattner at apple.com
Tue Sep 20 16:52:32 PDT 2011


On Sep 20, 2011, at 3:48 PM, Ted Kremenek wrote:

> Recently, a user reported to me a problem when using ccache and clang.  The issue is simple:
> 
> (1) Clang suppresses some warnings in macro expansions, e.g. -Wparentheses-equality.
> 
> (2) ccache produces preprocessed files that it uses for caching.
> 
> The combination of:
> 
>  (1) + (2)
> 
> results in ccache + clang sometimes producing more warnings than one just uses the compiler on its own.
> 
> I'm sure this is a known issue, but has this been raised before?  If not, any ideas on how we should solve this?  Is this something ccache should deal with, something clang should handle, or both?  I'm on the fence here myself, and would appreciate any opinions or suggestions.

I think this is "behaves correctly".  It is possible but impractical for -E output to include information about tokens "expanded from a macro".

-Chris



More information about the cfe-dev mailing list