This is the mail archive of the gcc-patches@gcc.gnu.org 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] struct member warning



  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


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