This is the mail archive of the
mailing list for the GCC project.
Re: patch to supress trailing missing initializer warnings
- To: law at cygnus dot com
- Subject: Re: patch to supress trailing missing initializer warnings
- From: Nathan Sidwell <nathan at cs dot bris dot ac dot uk>
- Date: Thu, 06 Aug 1998 09:15:02 +0100
- CC: Carlo Wood <carlo at runaway dot xs4all dot nl>, egcs-patches at cygnus dot com
- Organization: Computer Science Dept, Bristol University
- References: <520.902269321@upchuck>
Jeffrey A Law wrote:
> In message <199808041503.RAA17789@jolan.ppro>you write:
> > I recall that I suggested to give the warning if less then
> > three variables where left uninitialized.
> I think this is a poor design. Either it gives the warnings or it does not,
> it should not be dependent on how many remaining uninitialized fields exist.
Yes I too thought that was a poor design (sorry Carlo).
> The question I think needs to be answered is should the warning be on or off
> by default. I'm starting to lean towards the latter.
The patch doesn't quite go as far as removing any check with default
-Wall behaviour, and allows you to turn on the full warning. IMHO this
-Wall warning behaviour is better than no check (and better than a full
check, which is why I did it).
I didn't want to add another warning flag, so overloaded the meaning of
supplying both -W and -Wuninitialized (g++ already have flags that
behave this way, -W -Wall or -W -Wunused warns about unused args,
whereas none of the flags do so in isolation).
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
You can up the bandwidth, but you can't up the speed of light
firstname.lastname@example.org http://www.cs.bris.ac.uk/~nathan/ email@example.com