From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zack Weinberg To: Geert Bosch Cc: Richard Kenner , gcc@gcc.gnu.org Subject: Re: Ada files now checked in Date: Fri, 05 Oct 2001 13:48:00 -0000 Message-id: <20011005134822.E9432@codesourcery.com> References: <20011004114250.M16447@codesourcery.com> X-SW-Source: 2001-10/msg00322.html On Thu, Oct 04, 2001 at 03:09:48PM -0400, Geert Bosch wrote: > > > On Thu, 4 Oct 2001, Zack Weinberg wrote: > > 2. Since gnat 3.13 objects to -W options, compilation command lines > for Ada must not include them. However, compilation of C in the ada > subdirectory should include -W options. > > Also, in stage2 and stage3, we want to use the -W options for Ada files. > It is not the case that they are not used, since what happens is that > GNAT has the back end recognize its options (everything except -gnat* and > a few others), and processes the front-end options itself. > > We work hard to keep the compiler warning free, and it is way too easy to > start introducing new uninitialized variables and the like without using > -Wuninitialized. Also the warnings are useful to us, as they have caught > some lingering bugs that would have been hard to find otherwise. Oh. I thought they were all completely ignored. The simplest way to handle this would probably be to stick the -W options that are relevant to GNAT into ADAFLAGS and/or SOME_ADAFLAGS. As long as these are options recognized universally (and it sounds like the important one is -Wall, which is), there would be no problem. Of the current list of warnings applied to C code: LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes STRICT2_WARN = -Wtraditional -pedantic -Wno-long-long I think only -W, -Wall, and perhaps -Wwrite-strings are relevant. Can you confirm this? zw