[cfe-dev] Unused argument during compilation

David Chisnall csdavec at swan.ac.uk
Wed May 19 05:24:14 PDT 2010


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?  

David

--
This email complies with ISO 3103





More information about the cfe-dev mailing list