bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] warnings: Add gl_WARN_COMPLEMENT and gl_WARN_SUPPORTED.


From: Simon Josefsson
Subject: Re: [PATCH] warnings: Add gl_WARN_COMPLEMENT and gl_WARN_SUPPORTED.
Date: Tue, 18 Nov 2008 20:14:17 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux)

Brian Dessent <address@hidden> writes:

> Simon Josefsson wrote:
>
>> +# gl_MANYWARN_ALL_GCC(VARIABLE)
>> +# -----------------------------
>> +# Add all documented GCC (currently as per version 4.3.2) warning
>> +# parameters to variable VARIABLE.  Note that you need to test them
>> +# using gl_WARN_ADD if you want to make sure your gcc understands it.
>> +AC_DEFUN([gl_MANYWARN_ALL_GCC],
>
> Recent gcc versions have improved the --help interface so that you can
> specify --help=warnings, --help=optimizers, and so on.  You could
> potentially autogenerate this list with
>
> COLUMNS=999 gcc --help=warnings | awk 'NR>1 {print $1}'
>
> But only if gcc is new enough (4.3+).

Right, problem is that it isn't possible to infer which warnings are
implied by -Wall, -W etc, so a naive parsing will duplicate warnings.
However, the list seems to mention several warning flags which are not
discussed in the manual, I'll look into those...

> Also, while on the topic of warning control, you might be interested in
> -fdiagnostics-show-option which is available in 4.1+ and causes gcc to
> augment each diagnostic message with the name of the -W option that
> controls that message (at least for those that have a corresponding
> option.)

I'm using it, thanks.

/Simon




reply via email to

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