From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26565 invoked by alias); 8 Jan 2008 15:36:14 -0000 Received: (qmail 26557 invoked by uid 22791); 8 Jan 2008 15:36:14 -0000 X-Spam-Check-By: sourceware.org Received: from mail.artimi.com (HELO mail.artimi.com) (194.72.81.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 08 Jan 2008 15:35:56 +0000 Received: from rainbow ([192.168.8.46]) by mail.artimi.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 8 Jan 2008 15:35:53 +0000 From: "Dave Korn" To: "'Mark Mendell'" , "'Mark Mitchell'" Cc: , "'gcc'" , "'Hans-Peter Nilsson'" , "'Richard Guenther'" , , References: <20071218000552.GV3656@playstation.sony.com> <20071221220630.Y67443@dair.pair.com> <4772A350.6030907@codesourcery.com> <20080103233308.GD5853@playstation.sony.com> <477F190B.2000807@codesourcery.com> <84fc9c000801050240l6918b59dpd519dea81ddd3ad@mail.gmail.com> <47812F74.3020905@codesourcery.com> Subject: RE: __builtin_expect for indirect function calls Date: Tue, 08 Jan 2008 15:36:00 -0000 Message-ID: <003601c8520c$278d8390$2e08a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2008-01/txt/msg00062.txt.bz2 On 07 January 2008 21:15, Mark Mendell wrote: > A question was raised: Are side effects in the second parameter guaranteed > to be executed? Is it valid for a compiler to ignore any side effects? That perked up my curiosity: " The value of C must be a compile-time constant. " Can a compile-time constant have run-time side-effects? I couldn't think up an example off the top of my head... cheers, DaveK -- Can't think of a witty .sigline today....