This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: function.c uninitialized variable
- To: John Carr <jfc at mit dot edu>
- Subject: Re: function.c uninitialized variable
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 15 Apr 1998 00:10:07 -0600
- cc: egcs at cygnus dot com, wilson at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199804141952.PAA13856@jfc.>you write:
>
> This fixes a reference to uninitialized memory in promote_mode, but it
> may not be the right fix because UNSIGNEDP is set later in assign_parms
> and the value stored by promote_mode may be lost.
It's as good as any other change to fix this problem.
At best it could fix undefined behavior in assign_parms (consider
if a port incorrectly examines unsignedp in PROMOTE_MODE -- or
if the port doesn't set that variable in PROMOTE_MODE and we later
try to use it in assign_parms).
At worst we passthe wrong value into promote_mode and causes things
to break -- that would indicate a problem with a port's PROMOTE_MODE
definition.
Similarly if the initialization is wrong and happens to reach some
other use of unsignedp which previously didn't have an
initialization.
I went ahead and installed the change.
jeff