[cfe-dev] Unused argument during compilation

Rafael Espindola espindola at google.com
Wed May 19 11:39:11 PDT 2010


On 19 May 2010 08:24, David Chisnall <csdavec at swan.ac.uk> wrote:
> Hi,
>
> When I compile stuff with clang, I get a lot of noise in the output saying 'unused argument during compilation'.  This is because various layers of makefiles add things to the CFLAGS without checking whether they are already there.  If you specify -O2 twice, for example, clang will give you a misleading warning that -O2 is unused - in fact, it is used, but it's only used once.  The same is true for various other directives.
>
> Is it possible to suppress this, and only warn about options that really aren't used, rather than ones that are specified more times than they are used?

I think it is possible. If I recall correctly, the many -g* options
are doing the right thing now.

> David
>

Cheers,
-- 
Rafael Ávila de Espíndola




More information about the cfe-dev mailing list