[patch] struct member warning

Jeffrey A Law law@cygnus.com
Tue Jun 30 00:01:00 GMT 1998


  In message < 199806291218.OAA19424@jolan.ppro >you write:
  > Wouldn't it be better to suppress this warning when the last
  > parameter is a `0' or NULL ?
  > I know it is often used to initialize "the rest", ie:
Key word "often".  The whole point of warnings is to detect situations
where the programmer *might* have done something wrong.  I think this
case qualifies.

We can always make this particular warning off by default if it's
giving too man false positives.

  > Alternatively, the warning could be suppressed when
  > both: the last initializing element is 0 and *more* then
  > three elements are left uninitialized.  Such a case is likely on purpose.
E-yuk.  I'd recommend against this.

jeff



More information about the Gcc-patches mailing list