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 149B0308F4 for ; Wed, 18 Apr 2001 16:26:12 -0400 (EDT) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id f3IKMnj06444 for axp-list@listman.redhat.com; Wed, 18 Apr 2001 16:22:49 -0400 Received: from smtp4ve.mailsrvcs.net (smtp4vepub.gte.net [206.46.170.25]) by mail.redhat.com (8.11.0/8.8.7) with ESMTP id f3IKMnC06437 for ; Wed, 18 Apr 2001 16:22:49 -0400 Received: from voicenet.com (adsl-141-155-109-157.nyc.adsl.bellatlantic.net [141.155.109.157]) by smtp4ve.mailsrvcs.net (8.9.1/8.9.1) with ESMTP id UAA22779110 for ; Wed, 18 Apr 2001 20:41:09 GMT Message-ID: <3ADE12A4.777D7877@voicenet.com> Date: Wed, 18 Apr 2001 18:18:13 -0400 From: Uncle George X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.17-4 alpha) X-Accept-Language: en MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: gcc 2.96 optimization bug on RedHat7.0/alpha References: <200104180432.XAA03440@zakon.math.purdue.edu> <3ADDAF37.18D256A1@voicenet.com> <20010418085548.A28346@ellpspace.math.ualberta.ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: Its not my code segment, and from my experience a union might be better. although from this discourse not safe either. the code as stated should: 1) take address of x 2) make into int ptr 3) add 1 to ptr ( value of 4 bec its an int ptr ) 4) fetch integer from the address as calculated. It should not matter if at x there is 8 bytes of a double, as that distinction is superflous to the equation. anyway the segment was taken from a floor() function (akin to glibc: ./sysdeps/ieee754/dbl-64/s_floor.c). static double huge = 1.0e300; #endif #ifdef __STDC__ double __floor(double x) #else double __floor(x) double x; #endif { int32_t i0,i1,j0; u_int32_t i,j; EXTRACT_WORDS(i0,i1,x); <== Majic happens behind this macro which I suppose is tailored for each system j0 = ((i0>>20)&0x7ff)-0x3ff; : Michal Jaegermann wrote: > On Wed, Apr 18, 2001 at 11:13:59AM -0400, Uncle George wrote: > > Any compiler that does not produce the correct code has a bug - baring > > any error messages. > > Indeed, but you should also add "from a correct source" for clarity. > > > I suppose one has to deceide if an error message should be produced > > OR proper code should be produced. > > Can you explain what you intended to see from your example and why? > I was looking at that code yesterday and scratching my head. I am > still not absolutely sure what the _real_ meaning was supposed to be. > > If you want overlay different types you have 'union' construct for > that. Playing loose with pointers was not guaranteed to work ever.