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 F414B3F4EC for ; Tue, 2 Jul 2002 08:11:09 -0400 (EDT) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id g62CB9P11615 for axp-list@listman.redhat.com; Tue, 2 Jul 2002 08:11:09 -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 g62CB8a11611 for ; Tue, 2 Jul 2002 08:11:08 -0400 Received: from mail.gmx.net (sproxy.gmx.net [213.165.64.20]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id g62C1F903691 for ; Tue, 2 Jul 2002 08:01:15 -0400 Received: (qmail 25177 invoked by uid 0); 2 Jul 2002 12:11:02 -0000 Received: from lcmpc15.epfl.ch (128.178.8.36) by mail.gmx.net (mp001-rz3) with SMTP; 2 Jul 2002 12:11:02 -0000 Content-Type: text/plain; charset="us-ascii" From: Linus Gasser To: axp-list@redhat.com Subject: Floating point on alpha Date: Tue, 2 Jul 2002 14:10:58 +0200 X-Mailer: KMail [version 1.4] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200207021410.58761.ineiti@gmx.net> 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: 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...