This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: glibc conditioning


On 27 Aug 2001, Jinsong Zhao wrote:

> Date: 27 Aug 2001 15:52:46 -0700
> From: Jinsong Zhao <zhaojs@cadence.com>
> To: Ulrich Drepper <drepper@cygnus.com>
> Cc: libc-alpha@sources.redhat.com, stevew@srware.com
> Subject: Re: glibc conditioning
>
> Ulrich,
>
> I tested again on all the machines I have access to. The following
> lines:
>
>     double d=0.3;
>     int i = (int)(1000*d);
>
> Only on Linux i is 299, while on all other machines (Solaris, AIX,

These are operating systems, not machines. Are you talking about Solaris
on a SPARC or Intel or what?

> HPUX, FreeBSD) i is 300.

How do you account for this, when only the compiler is involved, and
both Linux and FreeBSD use GCC?

When I compile the above snippet on a GNU/Linux system, I get a sequence
of machine instructions, with absolutely no calls to any library function.

What versions of the compiler are you using on the Linux and FreeBSD
system? Reporting results like this is meaningless without dumping the
output of gcc --version, and mentioning what compiler options were
used. Showing the assembly code (gcc -S) might also be useful.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]