Error when parsing precompiled header:macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]

Issue #106 new
JinZhuHuang created an issue

My code includes some macro expand to "defined", then fauxpas make the following error message:

Error when parsing precompiled header:macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined].

I have tried calling fauxpas using params as below: --extraCompilerArgs OTHER_CFLAGS="-Wno-expansion-to-defined"

but then fauxpas failed to check codes. What is the right way to add compiler arguments like -Wno-expansion-to-defined?

Comments (4)

  1. Ali Rantakari repo owner

    Thanks for reporting this.

    Can you please verify whether this issue persists for you with the latest version (1.7.1) ?

    When using the --extraCompilerArgs option, insert the compiler flag directly there, like this:

    -Wno-expansion-to-defined
    

    not like this:

    OTHER_CFLAGS="-Wno-expansion-to-defined"
    
  2. JinZhuHuang reporter

    When using like this: --extraCompilerArgs -Wno-expansion-to-defined

    The following errors:

    Argument error: ERROR: Argument --extraCompilerArgs needs a value Argument error: ERROR: Unknown argument: -Wno-expansion-to-defined Determining build settings for 2 targets and 2 build configurations

  3. Log in to comment