Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Linus Gasser <ineiti@gmx.net>
To: axp-list@redhat.com
Subject: Re: Floating point on alpha
Date: Tue, 2 Jul 2002 16:03:09 +0200	[thread overview]
Message-ID: <200207021603.09920.ineiti@gmx.net> (raw)
In-Reply-To: <3D219DA0.EE8E97CE@uic.edu>

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




  reply	other threads:[~2002-07-02 14:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-02 12:10 Floating point on alpha Linus Gasser
2002-07-02 12:33 ` Doug Trainor
2002-07-02 14:03   ` Linus Gasser [this message]
2002-07-02 14:22     ` Joerg Bruehe
2002-07-02 13:01 ` Christian Iseli
  -- strict thread matches above, loose matches on Subject: below --
2002-07-02 13:10 Peter Petrakis
2002-07-08 22:54 Donsbach, Jeff
2002-07-09  2:42 ` Alvin Starr
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox