RE: Turn on compiler warnings by default for AC_PROG_CC, AC_PROG_CXX & AC_PROG_FC

Dale Visser <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Message-ID <[email protected]>
I've looked over the gnulib warnings module. 

> Date: Mon, 10 Feb 2014 16:00:11 -0700
> From: [email protected]
> Ah, but it IS a killer to anyone compiling with -Werror.
> ...
> You really want to borrow some of the ideas from here:
> http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=m4/warnings.m4
> 
> gl_COMPILER_OPTION_IF sounds like your proposed AC_APPEND_FLAG_IFVALID,
> with the added benefit of converting -Wno- into -W when probing (gcc
> ...
> Furthermore, that file also has gl_UNKNOWN_WARNINGS_ARE_ERRORS, which
> has various ways of making clang confess which warnings it understands
> ...

All in all, this really looks *much* better than AC_APPEND_FLAG_IFVALID. I will try to substitute in something very close to  gl_WARN_ADD for AC_APPEND_FLAG_IFVALID. 

I don't know the numbers, but I suspect gcc and clang together represent a majority of autoconf usage. I will post back when I have tested something I am happy with.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.