From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19019 invoked by alias); 18 Nov 2006 21:15:22 -0000 Received: (qmail 19008 invoked by uid 22791); 18 Nov 2006 21:15:22 -0000 X-Spam-Check-By: sourceware.org Received: from eyesopen.com (HELO www.eyesopen.com) (208.41.78.163) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 18 Nov 2006 21:15:17 +0000 Received: from localhost (roger@localhost) by www.eyesopen.com (8.11.6/8.11.6) with ESMTP id kAIKQrx32542; Sat, 18 Nov 2006 13:26:54 -0700 Date: Sat, 18 Nov 2006 21:47:00 -0000 From: Roger Sayle To: John David Anglin cc: gcc-patches@gcc.gnu.org Subject: Re: Ping: [PATCH] Limit precision of *bitsizetypes types In-Reply-To: <200611181752.kAIHqfjD004706@hiauly1.hia.nrc.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2006-11/txt/msg01333.txt.bz2 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. Perhaps: precision = MIN (precision, MAX_FIXED_MODE_SIZE); or 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. Roger --