ceilf returns 0.0 on SCO 5.0.5, egcs 1.1.2

Theo Petersen theo@acsp.com
Wed Jul 28 14:20:00 GMT 1999


Version:
229$ gcc -v
Reading specs from
/usr/local/lib/gcc-lib/i686-pc-sco3.2v5.0.5/egcs-2.91.66/spec
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)

Machine/OS info:
230$ uname -X

System = SCO_SV
Node = unix10
Release = 3.2v5.0.5
KernelID = 98/07/02
Machine = PentII(D)
BusType = ISA
Serial = 2CG001108
Users = 15-user
OEM# = 0
Origin# = 1
NumCPU = 2

Compiler command line:
gcc egcs_test.c -lm
(I also tried:
 gcc -I/usr/local/lib/gcc-lib/i686-pc-sco3.2v5.0.5/egcs-2.91.66/include
-I/usr/include egcs_test.c -lm)

Input file:
232$ cat
egcs_test.c                                                          
#include <math.h>
int main(int argc, char* argv[]) {
  float a,b;
  a = 9.9;
  b = ceilf(a);
  printf("a = %3.1f, b = %3.1f\n",a,b);
  return 0;

Output:
233$ a.out
a = 9.9, b = -0.0

Obviously b should equal 10.0.  It does so when I compile this with
SCO's native compiler.

Regards,
..Theo


More information about the Gcc-bugs mailing list