From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28190 invoked by alias); 14 Jul 2005 06:27:26 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 28160 invoked by uid 22791); 14 Jul 2005 06:27:19 -0000 Received: from monty-python.gnu.org (HELO monty-python.gnu.org) (199.232.76.173) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 14 Jul 2005 06:27:18 +0000 Received: from [213.36.80.91] (helo=mail.libertysurf.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dswwv-0005l5-OO for gcc@gcc.gnu.org; Thu, 14 Jul 2005 02:11:57 -0400 Received: from dyn-83-153-240-217.ppp.tiscali.fr (83.153.240.217) by mail.libertysurf.net (7.1.026) id 42A318CE0073F6F4; Thu, 14 Jul 2005 07:58:40 +0200 From: Eric Botcazou To: Hiroshi Fujishima Subject: Re: isinf Date: Thu, 14 Jul 2005 06:27:00 -0000 User-Agent: KMail/1.7.1 Cc: gcc@gcc.gnu.org, Joe Buck References: <7cfyui3a9r.fsf@gmail.com> <20050713232903.GA14174@synopsys.com> <7cr7e28e13.fsf@gmail.com> In-Reply-To: <7cr7e28e13.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200507140759.54024.ebotcazou@libertysurf.fr> X-SW-Source: 2005-07/txt/msg00578.txt.bz2 > Oops, the configure script compiling with -O2 optimization. Clearly not the best option for this kind of tests. > The compilation of the following code still suceesss. > > #include > > int a; > > int > main () > { > float f = 0.0; > a = isinf (f); > return 0; > } The compiler knows the answer of isinf (0) so it again optimizes away the call. Try something like: int a; int main (int argc, char *argv[]) { a = isinf ((double) argc); return 0; } or additionally compile with -fno-builtin. -- Eric Botcazou