Ping: [PATCH] Limit precision of *bitsizetypes types

Roger Sayle
Sat Nov 18 21:47:00 GMT 2006

On Sat, 18 Nov 2006, John David Anglin wrote:
> Small patch to stor-layout.c:
> <>.

Sorry for the delay.  This is OK for mainline.
Thanks for fixing this.

Do you have any opinions on the use of nested MIN/MAX macros?  Whilst
as long as the arguments are side-effect free, we'll produce valid code,
it may result in significant (temporary) code duplication caused by
macro expansion.


	precision = MIN (precision, MAX_FIXED_MODE_SIZE);


	if (precision > MAX_FIXED_MODE_SIZE)
	  precision = MAX_FIXED_MODE_SIZE;

which I think might be easier to read for some people, and may be easier
for the compiler to recognize as a pair on MIN_EXPRs.  Or perhaps
reassociate to use "MIN (MAX_FIXED_MODE_SIZE, 2 * HOST_BITS_PER_WIDE_INT)"
which should be a compile-time constant?

Oh, I don't know.  The code is perfectly fine as it is.  I suspect I'm
beginning to view things far too much from fold's perspective, and such
micro-optimizations are meaningless to the GCC big picture.
Ok for mainline.


More information about the Gcc-patches mailing list