[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnulib-bug
Subject:    Re: [PATCH] warnings: Add gl_WARN_COMPLEMENT and gl_WARN_SUPPORTED.
From:       Simon Josefsson <simon () josefsson ! org>
Date:       2008-11-18 19:14:17
Message-ID: 87y6zgc0dy.fsf () mocca ! josefsson ! org
[Download RAW message or body]

Brian Dessent <brian@dessent.net> 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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic