This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] struct member warning
- To: Carlo Wood <carlo at runaway dot xs4all dot nl>
- Subject: Re: [patch] struct member warning
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 30 Jun 1998 00:51:33 -0600
- cc: haible at ilog dot fr (Bruno Haible), egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
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