From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.redhat.com (Postfix) with ESMTP id 0357B3EA2B for ; Mon, 8 Jul 2002 18:57:00 -0400 (EDT) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id g68Muxf09995 for axp-list@listman.redhat.com; Mon, 8 Jul 2002 18:56:59 -0400 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id g68Muxa09990 for ; Mon, 8 Jul 2002 18:56:59 -0400 Received: from zmamail05.zma.compaq.com (zmamail05.zma.compaq.com [161.114.64.105]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id g68Mkb905072 for ; Mon, 8 Jul 2002 18:46:37 -0400 Received: from tayexg11.americas.cpqcorp.net (tayexg11.americas.cpqcorp.net [16.103.130.96]) by zmamail05.zma.compaq.com (Postfix) with ESMTP id CB2DC2724 for ; Mon, 8 Jul 2002 18:56:58 -0400 (EDT) Received: from tayexc14.americas.cpqcorp.net ([16.103.130.45]) by tayexg11.americas.cpqcorp.net with Microsoft SMTPSVC(5.0.2195.2966); Mon, 8 Jul 2002 18:54:26 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: Floating point on alpha Date: Mon, 8 Jul 2002 18:54:10 -0400 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Floating point on alpha Thread-Index: AcIhwa+ty5mk8ut+QQWJUiBqCqlHjQFEIrdg From: "Donsbach, Jeff" To: X-OriginalArrivalTime: 08 Jul 2002 22:54:26.0025 (UTC) FILETIME=[68A24D90:01C226D2] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by int-mx1.corp.redhat.com id g68Muxa09990 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: Purify would flag this usage of "a" as a "UMR" or uninitialized memory read. I.e. it is a lurking bug. Stack variables are not required to be initialized to zero as the code seems to assume. > -----Original Message----- > From: Linus Gasser [mailto:ineiti@gmx.net] > Sent: Tuesday, July 02, 2002 8:11 AM > To: axp-list@redhat.com > Subject: Floating point on alpha > > > Hi all, > I have a general question for alphas: from time to time when > I try to compile > a program for my alpha (PC164), I run into problems with > doubles. For example > > { > double a; > > if ( a ){ > printf( "love\n" ); > } else { > printf( "peace\n" ); > } > } > > seems to run w/o problems on an i386 and produces "peace" as > output. Now, on > an alpha (can't test it right now, but try it out and tell > me), it segfaults, > cause 'a' is not defined. Seems logical to me. But as it runs > on i386, lots > of programs have this kind of logic (gnome-print had it, > breakout2 had it, > scribus had it, noteedit has it (note the had/has and try to > figure out which > program I'd like to run on my alpha ;-) ). > Now my question: is it possible to remove this behaviour with a good > compiler-switch? Because going over these programs, searching for > non-initialised doubles gets on my nerves. OK, I should, as > it is really bad > programming, and I could contribute like this (and did > sometimes). But > still... Any hints? > > Ineiti > > PS: if this 'magic' compiler switch doesn't exist, I have a > question about gdb > with libraries and how to use the '-g' switch in this case. > Just to find > those #@$%-variables... > > > > _______________________________________________ > Axp-list mailing list > Axp-list@redhat.com > https://listman.redhat.com/mailman/listinfo/axp-list >