[ccache] cache hides compiler warnings about comments
akim at lrde.epita.fr
Mon Oct 28 02:02:20 MDT 2013
Le 27 oct. 2013 à 21:25, Joel Rosdahl <joel at rosdahl.net> a écrit :
> Hi Akim,
> > Compilers such as gcc/clang support -C/-CC to leave comments
> > in the preprocessed output. Wouldn't it make sense to use it
> > in ccache?
> Perhaps yes, but one problem with that is that ccache (currently) can't assume that the compiler accepts -C/-CC.
> Also, there is this caveat in GCC documentation: "You should be prepared for side effects when using -C; it causes the preprocessor to treat comments as tokens in their own right. For example, comments appearing at the start of what would be a directive line have the effect of turning that line into an ordinary source line, since the first token on the line is no longer a #."
I saw that, but thought this would be rather bizarre. However,
try to pass -C to a project of mine resulted in compiler errors
in Boost files. So, yes, it's not that simple :(
> By the way, a workaround is to set CCACHE_CPP2 when compiling.
Thanks, I'll have a look at this!
FWIW, I think that a short note about -Wdocumentation in the
documentation might save time for some people. I, for one,
looked on the Internet first, and found nothing. And it
took me an embarrassingly long time to figure out what was
going on :)
More information about the ccache