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 43D563EFC2 for ; Tue, 2 Jul 2002 10:03:28 -0400 (EDT) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id g62E3RT02467 for axp-list@listman.redhat.com; Tue, 2 Jul 2002 10:03:27 -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 g62E3Ra02463 for ; Tue, 2 Jul 2002 10:03:27 -0400 Received: from mail.gmx.net (pop.gmx.net [213.165.64.20]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id g62DrX918212 for ; Tue, 2 Jul 2002 09:53:33 -0400 Received: (qmail 1934 invoked by uid 0); 2 Jul 2002 14:03:13 -0000 Received: from lcmpc15.epfl.ch (128.178.8.36) by mail.gmx.net (mp014-rz3) with SMTP; 2 Jul 2002 14:03:13 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Linus Gasser To: axp-list@redhat.com Subject: Re: Floating point on alpha Date: Tue, 2 Jul 2002 16:03:09 +0200 X-Mailer: KMail [version 1.4] References: <200207021410.58761.ineiti@gmx.net> <3D219DA0.EE8E97CE@uic.edu> In-Reply-To: <3D219DA0.EE8E97CE@uic.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200207021603.09920.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, just had a look at the documentation, and found the following: >> Like many static checkers, Splint detects instances where the value of a location is used before it is defined. This analysis is done at the procedural level. If there is a path through the procedure that uses a local variable before it is defined, a use before definition error is reported. The usedef flag controls use before definition checking. << That means that if I call a function with a non-initialised double it won't be detected. But it should. Hmm, I gotta try that gdb once again. Trouble is: if I run it on noteedit, it crashes in a library (libnoteedit.so.1), and I don't get gdb to read the symbol-table. OK, at least I get the function-name where it crashes, but not the line. And always putting cout << x << endl; in the code to see where it crashes is not my idea of debugging. Any better ideas? Ineiti On Tuesday 02 July 2002 14:33, Doug Trainor wrote: > Just because the other kids do it doesn't mean you have to. > > You could run Splint... [or something like the old UNIX lint(1)] > > http://lclint.cs.virginia.edu/ > http://sourceforge.net/projects/lclint/ > etc > > Linus Gasser wrote: > > 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 > > _______________________________________________ > Axp-list mailing list > Axp-list@redhat.com > https://listman.redhat.com/mailman/listinfo/axp-list