This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] struct member warning
- To: Bruno Haible <haible at ilog dot fr>
- Subject: Re: [patch] struct member warning
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 19 Jun 1998 23:26:59 -0600
- cc: egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199803301357.PAA17885@halles.ilog.fr>you write:
> > > Here is a patch which adds a warning (triggered by
> > > "-Wuninitialized").
> >
> > I think that is the wrong switch. Initialized to zero is considerably
> > different from uninitialized.
>
> You're right, but I would like to avoid too many -W options.
> Let's have the warning triggered by "-W" (extra_warnings). Here is the
> patch.
>
>
> gcc/ChangeLog:
>
> Mon Mar 30 02:40:32 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsr
> uhe.de>
>
> * c-typeck.c (pop_init_level): Warn about uninitialized members in
> struct initializers.
>
> gcc/cp/ChangeLog:
>
> Mon Mar 30 02:40:32 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsr
> uhe.de>
>
> * typeck2.c (process_init_constructor): Warn about uninitialized
> members in struct initializers.
I made some minor comment clarifications and installed this patch.
jeff