This is the mail archive of the gcc@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: function.c uninitialized variable



  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


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