xcode/clang: clang: warning: argument unused during compilation: '-fcheck-new'

39,507

This warning can be silenced by adding the flag -Qunused-arguments

It's a warning because clang does not support the -fcheck-new argument.

Share:
39,507

Related videos on Youtube

kakyo
Author by

kakyo

The more you learn, the more you hesitate.

Updated on January 10, 2020

Comments

  • kakyo
    kakyo over 4 years

    As title:

    I'm constantly getting this warning that flooded out my screen in Xcode4 for the -fcheck-new options that I use.

    clang: warning: argument unused during compilation: '-fcheck-new'
    

    Is it that clang does not support this gcc compiler option??? How can I get rid of the warnings?

    Thanks!

  • Carl Norum
    Carl Norum over 11 years
    You could also remove the bad flag.
  • Arto Bendiken
    Arto Bendiken almost 11 years
    For those of you who got these warnings when using Clang in conjunction with ccache, find more particulars here: petereisentraut.blogspot.com/2011/05/ccache-and-clang.html
  • Kurt Schwehr
    Kurt Schwehr over 10 years
    For callbacks, it may not be possible to remove the unused flag. Is there an equivalent to gcc's attribute((__unused)) ?
  • Julian
    Julian almost 9 years
    @CarlNorum not always you can remove the flag example
  • cxw
    cxw almost 7 years
    @ArtoBendiken Thanks very much - your link was just what I needed. For those running Cygwin x64, as of writing, the packaged ccache does not include the bugfix. Therefore, you have to build ccache from source to get rid of the warnings.