This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Ada files now checked in
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