[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch #8707] AX_APPEND_COMPILE_FLAGS: -Wno-FOO doesn't work with gcc

From: anonymous
Subject: [patch #8707] AX_APPEND_COMPILE_FLAGS: -Wno-FOO doesn't work with gcc
Date: Sun, 26 Jul 2015 11:27:53 +0000
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0


                 Summary: AX_APPEND_COMPILE_FLAGS: -Wno-FOO doesn't work with
                 Project: GNU Autoconf Archive
            Submitted by: None
            Submitted on: So 26 Jul 2015 11:27:51 UTC
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any



I'd like to add -Wno-incompatible-library-redeclaration for clang.  The


does not work, because it adds it when using gcc, too.

The macro's description states:

    For every FLAG1, FLAG2 it is checked whether the compiler works with the
flag.  If it does, the flag is added FLAGS-VARIABLE

It doesn't quite work for gcc when FLAG1 is of the form -Wno-FOO,

     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.

An obvious way to make it work is testing -WFOO instead of -Wno-FOO.

Crude patch attached.


File Attachments:

Date: So 26 Jul 2015 11:27:51 UTC  Name: ax_append_compile_flags.patch  Size:
572B   By: None



Reply to this item at:


  Nachricht gesendet von/durch Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]