Hi, On Wed, Oct 11, 2017 at 10:04 PM, Helmut K. C. Tessarek < tessa...@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 > thread: > > ----------------------------------------------------------------------- > The test in configure passes, I think because: > > <https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html>: > """ > 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 [-Wunused-command-line-argument] clang: warning: argument unused during compilation: '-Wno-bool-operation' [-Wunused-command-line-argument] success 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 '-Wno-bool-conversion'? [-Wunknown-warning-option] 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 success error: unknown warning option '-Wno-bool-operation'; did you mean '-Wno-bool-conversion'? [-Werror,-Wunknown-warning-option] That last one should allow this to work. Ronald _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel