[cfe-dev] ccache and 'unused argument' warning

Chris Lattner clattner at apple.com
Sat Jun 19 10:32:54 PDT 2010


I have no idea, apparently so?

-Chris

On Jun 19, 2010, at 8:02 AM, Diego Iastrubni wrote:

> ... wait, ccache support clang? that's good news :)
> 
> On Sat, Jun 19, 2010 at 8:30 AM, Chris Lattner <clattner at apple.com> wrote:
> A user who uses ccache reported that it is apparently doing something that causes it to emit tons of "argument unused during compilation warnings".  A typical invocation is something like this:
> 
> ccache clang++ -m32 -mmmx -msse  -pipe -march=pentium-m -I/usr/include/malloc -fasm-blocks -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -Wno-invalid-offsetof -Wno-unknown-pragmas -Wno-unused-parameter -Wno-reorder -Wno-unused-value -Wno-missing-field-initializers -Wno-sign-compare -Wno-invalid-offsetof -Wno-write-strings -gdwarf-2 -g2 -O3 -fno-strict-aliasing -DNDEBUG -DGNUC -DPOSIX -D_OSX -DOSX -Ifoo -c foo.cpp -o foo.o
> 
> which produces warnings like this:
> clang: warning: argument unused during compilation: '-c'
> clang: warning: argument unused during compilation: '-I/usr/include/malloc'
> clang: warning: argument unused during compilation: '-isysroot /Developer/SDKs/MacOSX10.5.sdk'
> clang: warning: argument unused during compilation: '-DNDEBUG'
> clang: warning: argument unused during compilation: '-DGNUC'
> clang: warning: argument unused during compilation: '-DPOSIX'
> clang: warning: argument unused during compilation: '-D_OSX'
> clang: warning: argument unused during compilation: '-DOSX'
> clang: warning: argument unused during compilation: '-Ifoo'
> 
> etc.  This is apparently local to something that ccache is doing: it must be running clang multiple times, one with some funny options.  The user was alarmed because he didn't think that clang had implemented such exotic options as -D and -I :) due to these warnings.
> 
> The question is: is this a ccache bug, or should we hack clang somehow to work better with ccache?  I don't use ccache or know anything about it, so I don't really have an opinion here.
> 
> -Chris
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100619/824166c3/attachment.html>


More information about the cfe-dev mailing list