From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id 6A2A72F519 for ; Wed, 18 Apr 2001 09:40:35 -0400 (EDT) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id f3IDbCf13434 for axp-list@listman.redhat.com; Wed, 18 Apr 2001 09:37:12 -0400 Received: from elf.theochem.kth.se (elf.theochem.kth.se [130.237.52.51]) by mail.redhat.com (8.11.0/8.8.7) with ESMTP id f3IDbCC13430 for ; Wed, 18 Apr 2001 09:37:12 -0400 Received: from beta.theochem.kth.se (IDENT:root@beta.theochem.kth.se [130.237.52.99]) by elf.theochem.kth.se (8.9.3/8.9.3) with ESMTP id PAA08929 for ; Wed, 18 Apr 2001 15:40:19 +0200 Received: (from pawsa@localhost) by beta.theochem.kth.se (8.9.3/8.9.3) id PAA03968 for axp-list@redhat.com; Wed, 18 Apr 2001 15:40:16 +0200 Date: Wed, 18 Apr 2001 15:40:16 +0200 From: Pawel Salek To: axp-list@redhat.com Subject: Re: gcc 2.96 optimization bug on RedHat7.0/alpha Message-ID: <20010418154016.A3496@beta.theochem.kth.se> References: <200104180432.XAA03440@zakon.math.purdue.edu> <3ADDAF37.18D256A1@voicenet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 In-Reply-To: <3ADDAF37.18D256A1@voicenet.com>; from gatgul@voicenet.com on Wed, Apr 18, 2001 at 17:13:59 +0200 X-Mailer: Balsa 1.1.3 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.redhat.com id f3IDbCC13430 X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: On 2001-04-18 17:13 Uncle George wrote: > Any compiler that does not produce the correct code has a bug - baring > any error messages. > > I suppose one has to deceide if an error message should be produced > OR proper code should be produced. So, proper code has been generated because ISO C allows that. Full stop. I cannot imagine what error message should be produced (hm, ... "I am producing the code following ISO C standard. You use ambigous type casts and the result may be different from your expectations"). This gives rise to a question what is "ambigous type cast" and what algorithm should the compiler use to recognize that it is about to violate your assumptions. /Pawel > > > > In ISO C, the compiler can assume that the address of a real is not > > the same as the address of an int, and gcc does so unless you give > > the -fno-strict-aliasing flag: -- Pawel Salek (pawsa@theochem.kth.se) http://www.theochem.kth.se/~pawsa/ Theoretical Chemistry Division, KTH voice: +46 8 790-8202