This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: "introduce no new bootstrap warning" criteria. was: Loop iv debugging patch
- To: gcc at gcc dot gnu dot org
- Subject: Re: "introduce no new bootstrap warning" criteria. was: Loop iv debugging patch
- From: Akim Demaille <akim at epita dot fr>
- Date: 12 Jan 2001 16:55:09 +0100
- Organization: EPITA / LRDE
- References: <20010112152130.A78CD34E77@nile.gnat.com>
>>>>> "Robert" == Robert Dewar <dewar@gnat.com> writes:
Robert> In GNAT, we have a compiler option to make all warnings fatal,
Robert> and we always use this option for all builds. We have also
Robert> adopted a zero warnings tolerance for all our C code.
In forthcoming Autoconf 2.50 we have introduced support for a new
hopefully standard envvar, WARNINGS. I plan to propagate its support
in several tools, the ultimate goals being to make it possible to run
say a test suite with an ultra severe environment, something which is
extremely useful in the development of Autoconf for instance.
Bison is next on my list, and it would be great if GCC could support
it too.
Here is the documentation provided with Autoconf:
`autoconf' accepts the following options:
[--- CUT ---]
`--warnings=CATEGORY'
`-W CATEGORY'
Report the warnings related to CATEGORY (which can actually be a
comma separated list). *Note Reporting Messages::, macro
`AC_DIAGNOSE', for a comprehensive list of categories. Special
values include:
`all'
report all the warnings
`none'
report none
`error'
treats warnings as errors
`no-CATEGORY'
disable warnings falling into CATEGORY
Warnings about `syntax' are enabled by default, and the environment
variable `WARNINGS', a comma separated list of categories, is
honored. `autoconf' will actually behave as if you had run
autoconf --warnings=syntax,$WARNINGS,CATEGORIES
If you want to disable `autoconf''s defaults and `WARNING' but
enable the warnings about obsolete constructs, use `-W
none,obsolete'.
`autoconf' displays a back trace for errors, but not for warnings;
if you want them, just pass `-W error'. For instance on this
`configure.ac':
AC_DEFUN([INNER],
[AC_TRY_RUN([true])])
AC_DEFUN([OUTTER],
[INNER])
AC_INIT
OUTTER
you get:
/tmp % ace -Wcross
configure.ac:8: warning: AC_TRY_RUN called without default \
to allow cross compiling
/tmp % ace -Wcross,error
configure.ac:8: error: AC_TRY_RUN called without default \
to allow cross compiling
acgeneral.m4:3044: AC_TRY_RUN is expanded from...
configure.ac:2: INNER is expanded from...
configure.ac:5: OUTTER is expanded from...
configure.ac:8: the top level