[cfe-dev] -Wunused-value gets triggered only when storing/using intermediate outputs

David Blaikie via cfe-dev cfe-dev at lists.llvm.org
Sun Jan 5 10:20:12 PST 2020


You can also use -frewrite-includes to avoid a full preprocessing (rather
than -E). I'm not sure if this necessarily gets you exact warning
reproducibility, but closer.

On Sun, Jan 5, 2020 at 8:26 AM Lubos Lunak via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> On Monday 30 of December 2019, Nehal J Wani via cfe-dev wrote:
> > - Is this behavior expected? Why does the warning throw up only when the
> > end user wants to do anything with the intermediate outputs? I ended up
> > here because this was failing my project when I was trying to use distcc.
>
>  Some of Clang's warnings, such as this one, are disabled if the code
> comes
> from a macro expansion. This is why you see the warning only if you first
> expand the code.
>
>  If your concern is just related to distributed compiling, either build
> without -Werror, or use icecc/icecream, which generally distributes the
> builds without preprocessing first.
>
> --
>  Lubos Lunak
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200105/c654b719/attachment.html>


More information about the cfe-dev mailing list