autoconf-patches
[Top][All Lists]
Advanced

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

Re: Turn on compiler warnings by default for AC_PROG_CC, AC_PROG_CXX & A


From: Russ Allbery
Subject: Re: Turn on compiler warnings by default for AC_PROG_CC, AC_PROG_CXX & AC_PROG_FC
Date: Fri, 17 Jan 2014 14:26:27 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Zack Weinberg <address@hidden> writes:

> -ansi, however, should not be in there at all; it doesn't just turn on
> strict conformance mode, it turns on strict *C89* conformance mode,
> which is often wrong for new code.  And even nowadays, strict
> conformance mode in general tends to break system headers.

Seconded.  I have one package that I do test with -ansi, but mostly out of
personal curiosity.  Satisfying -ansi requires several contortions that
are not really helpful for real-world portability for typical free
software packages, such as limiting the length of quoted strings and
messing about with feature-test macros.  I think it's more of a
specialized flag best reserved for environments with very particular
standards-conformance requirements, or where one is targeting platforms
that may not provide any functionality over the bare ANSI minimum.

The same concerns apply to a lesser extent to --std=c99 or --std=c11.

-- 
Russ Allbery (address@hidden)              <http://www.eyrie.org/~eagle/>



reply via email to

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