This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: patch to supress trailing missing initializer warnings

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]