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]
Other format: [Raw text]

Re: Initialize previous in read_state_param_structs


On 05/30/2011 11:51 AM, Alexandre Oliva wrote:
> Bootstrap-O3 complains about uninitialized uses of this variable in
> gengtype-state.c.  The variable can never actually be used before
> initialization, but GCC is not smart enough to realize that.
> read_state_structures, just before the function at hand, has a similar
> loop and it zero-initializes both head and previous, so I adjusted the
> affected function to follow the same pattern and avoid the bogus
> warning.  Regstrapped on x86_64-linux-gnu and i686-pc-linux-gnu.  Ok to
> install?

Ok. Alternatively you could fix the warning and shorten the code using
the pprev trick.


Bernd


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