public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Warren du Plessis <warren@eng.up.ac.za>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: other/8974: fabs error with -ansi
Date: Mon, 23 Dec 2002 02:26:00 -0000	[thread overview]
Message-ID: <20021223102602.29395.qmail@sources.redhat.com> (raw)

The following reply was made to PR other/8974; it has been noted by GNATS.

From: Warren du Plessis <warren@eng.up.ac.za>
To: bangerth@dealii.org,  gcc-bugs@gcc.gnu.org,  gcc-prs@gcc.gnu.org, 
 nobody@gcc.gnu.org,  warren@eng.up.ac.za,  gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: other/8974: fabs error with -ansi
Date: Mon, 23 Dec 2002 12:25:15 +0000

 Hi,
 
 If I try to link with "-static -ansi -lm" I get the following error message:
 /tmp/cc6IBIGC.o: In function `main':
 /tmp/cc6IBIGC.o(.text+0x43): undefined reference to `fabs'
 /tmp/cc6IBIGC.o(.text+0x89): undefined reference to `fabs'
 /tmp/cc6IBIGC.o(.text+0xca): undefined reference to `fabs'
 collect2: ld returned 1 exit status
 If I remove the -ansi flag and compile with "-static -lm" everything 
 works perfectly as I explained previously.
 
 I tried compiling with -O through -O8 (just to make sure! - I know the 
 docs say that there is nothing above -O3, but a friend of mine says that 
 it goes up to -O5 or -O6 at least) and got exactly the same results.
 
 My friend says that it could be a typecasting problem if that helps.
 
 Thanks for your help!
 Warren
 
 bangerth@dealii.org wrote:
 
 >Synopsis: fabs error with -ansi
 >
 >State-Changed-From-To: open->feedback
 >State-Changed-By: bangerth
 >State-Changed-When: Fri Dec 20 19:37:38 2002
 >State-Changed-Why:
 >    The problem you write seems as if for certain numbers the
 >    implementation of fabs is doing something wrong, but only
 >    on certain machines. Now, fabs is a function that libm
 >    implements, not the compiler, so to find out where the
 >    problem lies exactly, try the following:
 >    
 >    - try linking with -static on a machine where it works.
 >      This makes sure that not the local libm is taken, but the
 >      one from the system where it works. Try the other way
 >      round and see whether it then also fails on the machines
 >      it worked on previously.
 >    - Try what happens when you switch on optimization.
 >    
 >    Just for the reference, I cannot reproduce the problem
 >    on a PIII, but that was to be expected from your report.
 >    
 >    Thanks
 >      Wolfgang
 >
 >http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8974
 >
 >
 >  
 >
 
 
 


             reply	other threads:[~2002-12-23 10:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-23  2:26 Warren du Plessis [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-05-12 11:46 steven
2002-12-20 19:37 bangerth
2002-12-17  2:16 warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021223102602.29395.qmail@sources.redhat.com \
    --to=warren@eng.up.ac.za \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).