[PATCH]: eliminate the "wide" functions/macros

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Thu May 13 00:11:00 GMT 2004

 > From: Zack Weinberg <zack@codesourcery.com>
 > Your analysis certainly seems plausible, but just to be sure, would
 > you test the compiler in a 32x64 configuration please?  This is the
 > condition where 'long' is narrower than HOST_WIDE_INT, which I suspect
 > is the only way this could possibly cause trouble even in the absence
 > of prototypes.

You certainly can encounter errors in the case where `long' is not 
narrower that HOST_WIDE_INT in the absence of prototypes.

Consider an lp64 system where you call GEN_INT(4).  Here you're
passing a 32-bit int to a function expecting a 64-bit long.  This will
fail if there's no prototype to widen the parameter.  That scenario is
what I checked by regtesting on sparc64-sun-solaris2.9.

Nevertheless, when long is also 32-bit, but HOST_WIDE_INT is 64, then
there are *additional* cases where errors will occur, such as the
contrived example of GEN_INT(4L) which needs a prototype to widen a
32-bit long to a 64-bit long long.

So I also tested a 32x64 configuration on sparc-sun-solaris2.9 and
included an -m64 pass.  There were no regressions there either.

 > OK if that shows no problems.
 > zw

Thanks, I'll install it after the mainline freeze is lifted.

Kaveh R. Ghazi			ghazi@caip.rutgers.edu

More information about the Gcc-patches mailing list