[ovs-git] [openvswitch/ovs] 4c1e8c: acinclude.m4: Really check whether GCC support -Wn...

GitHub noreply at github.com
Wed Sep 26 20:24:15 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 4c1e8cb9423df8dfd53b0e8ffe58a3d4a9c5148a
      https://github.com/openvswitch/ovs/commit/4c1e8cb9423df8dfd53b0e8ffe58a3d4a9c5148a
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2018-09-26 (Wed, 26 Sep 2018)

  Changed paths:
    M acinclude.m4

  Log Message:
  -----------
  acinclude.m4: Really check whether GCC support -Wno-null-pointer-arithmetic.

I've noticed recently an annoying quantity of error messages like the
following in builds in various places:

    gcc: error: unrecognized command line option ‘-Wunknown-warning-option’

This didn't really make sense because OVS checks whether the compiler
supports warning options before it uses them.  Looking closer, the GCC
manual has a note that explains the issue:

     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.

Thus, we can properly check only for the *positive* version of a warning
option, so this commit makes the OVS tests do that.

Fixes: a7021b08b0d5 ("configure: Disable -Wnull-pointer-arithmetic Clang warning.")
Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Aaron Conole <aconole at redhat.com>



      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the git mailing list