Brian Dessent <[EMAIL PROTECTED]> 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