[cfe-dev] Warnings are different on preprocessed file

Lubos Lunak l.lunak at centrum.cz
Wed Apr 30 03:12:01 PDT 2014


On Friday 25 of April 2014, Volker Diesel wrote:
> Hi Lubos.
>
> Thanks for your reply and your explanations and sorry for my late reply. I
> am a colleague of Martin Richtarsky, and actually I am the one who asked
> Martin to report this bug.
>
> First, I would like to give you some more background. We have implemented
> our own compile cluster for several reasons (better performance, higher
> reliability, integrated distributed object files cache, remote cluster
> administration, support for Windows builds, etc.). However, in order to
> provide these cluster features (the cache features in particular and
> support for Windows), the preprocessing step is absolutely mandatory!

 Given that -frewrite-includes output is basically all the input the 
compilation will get, and that ccache can work with clang too, I somewhat 
doubt that, but it's your code, so if you insist.

> I would like to add two thoughts regarding this bug report:
>
> 1) One might discuss, whether the compiler should emit or skip warnings, if
> these warnings only occur after macro expansion.
...
> 2) However, warning behavior after macro expansion isn't really the topic
> of this bug report. The key topic here is, that compiling a CPP file
> directly gives different warnings than first preprocessing CPP file and
> then compiling preprocessed file.

 I'm not a Clang developer, so you don't need to convince me. And guessing 
from the lack of any other comments, I'd say your convicing will need to take 
the form of patches.

-- 
 Lubos Lunak



More information about the cfe-dev mailing list