routine "finite()" not in libm.a

routine "finite()" not in libm.a

Post by Daniel R. Grays » Fri, 22 Jul 1994 22:24:46



With gcc 2.5.8 under linux the program

#include <math.h>
main(){
        finite(1.);
        }

compiles only if the flag -O is used, for else it expects to find the routine
"finite" in libm.a.  Why isn't it there?

 
 
 

routine "finite()" not in libm.a

Post by Mitchum DSou » Sat, 23 Jul 1994 02:40:31



writes:
|> With gcc 2.5.8 under linux the program
|>
|> #include <math.h>
|> main(){
|>   finite(1.);
|>   }
|>
|> compiles only if the flag -O is used, for else it expects to find the
|> routine
|> "finite" in libm.a.  Why isn't it there?

Please mention your library version.

Anyway thanx. This is a bug. The include "math.h" doesn't have the prototype
if optimization flags are switched off. Either way the ony effect should be a
warning as the function *does* exist in libm.a (well at least in mine)

        % nm /usr/lib/libm.a |grep finite
        __finite.o:
        00000000 T ___finite
        finite.o:
                 U ___finite
        00000000 I _finite

You can prototype the function yourself in the program until the prototype is
fixed.

Mitch