[FFmpeg-devel] warning: unknown warning option '-Wno-bool-operation'; did you mean '-Wno-bool-conversion'? [-Wunknown-warning-option]
Ronald S. Bultje
rsbultje at gmail.com
Thu Oct 12 13:38:10 EEST 2017
On Wed, Oct 11, 2017 at 10:04 PM, Helmut K. C. Tessarek <
tessarek at evermeet.cx> wrote:
> On 2017-10-11 21:59, James Almer wrote:
> > Clang seems to warn instead of fail when an option does not exist, so
> > configure things it exists.
> > A solution could be to somehow make clang fail instead of warn (-Werror
> > only during the test maybe?). Or just revert this again and ignore the
> > two or so cases where gcc thinks it should warn about boolean operations.
> This sounds pretty much the same as Mark Thompson suggested in another
> The test in configure passes, I think because:
> When an unrecognized warning option is requested (e.g.,
> -Wunknown-warning), GCC emits a diagnostic stating that the option is
> not recognized. However, if the -Wno- form is used, the behavior is
> slightly different: no diagnostic is produced for -Wno-unknown-warning
> unless other diagnostics are being produced. This allows the use of new
> -Wno- options with old compilers, but if something goes wrong, the
> compiler warns that an unrecognized option is present.
> Not sure exactly how to fix that. Could we replace the check with
> something like "-Werror=bool-operation", which does error out when it
> doesn't find the warning option, and only add the "-Wno-bool-operation"
> if that works?
>From IRC yesterday (gcc=clang here):
bash-4.4$ gcc /dev/null -Wno-bool-operation -c -o /tmp/x.o && echo success
clang: warning: /dev/null: 'linker' input unused
clang: warning: argument unused during compilation: '-Wno-bool-operation'
bash-4.4$ gcc -Wno-bool-operation /tmp/x.c -c -o /tmp/x.o
-Werror=unused-command-line-argument && echo success
warning: unknown warning option '-Wno-bool-operation'; did you mean
1 warning generated.
successbash-4.4$ gcc -Wno-bool-operation /tmp/x.c -c -o /tmp/x.o
-Werror=unused-command-line-argument -Werror=unknown-warning-option && echo
error: unknown warning option '-Wno-bool-operation'; did you mean
That last one should allow this to work.
More information about the ffmpeg-devel