[Top][All Lists]

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

Re: AC_*/AM_* macros for options

From: David A. Wheeler
Subject: Re: AC_*/AM_* macros for options
Date: Wed, 30 Oct 2013 01:32:14 -0400 (EDT)

> David A. Wheeler wrote:
> > AC_PROG_CC_WARNINGS([low])  # off, low, medium, high; default medium
> > and in gcc "medium" might map to "-Wall".

On Tue, 29 Oct 2013 21:00:05 -0700, Paul Eggert <address@hidden> wrote:
> I'm afraid in practice things are not quite that simple.
> The set of warning flags that are useful varies from project;
> it's not a simple dial that one can turn from 1 to 10.

Exactly the sort of stuff that calls out for a higher-level interface.
Especially since there are compilers other than GCC, which don't
have the same warning flags.

>   * But disable -Wtautological-constant-out-of-range-compare,
>     -Wpointer-sign, -Wformat-extra-args, -Wunused-command-line-argument,
>     -Wunused-value if using clang.

I think there would need to be a higher-level "abstract"
know (low, medium, high), and then a way to add specific
compiler-specific options for specific circumstances.

Something like:
AC_PROG_CC_WARNINGS_ADD([clang], [-Wtautological-constant-out-of-range-compare 
-Wpointer-sign -Wformat-extra-args]

> If you're interested in pursuing this, I suggest that
> you look at the for Emacs, grep, coreutils,
> diffutils, and tar, and look for some of the variations.

Thanks, nice lead.

--- David A. Wheeler

reply via email to

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