math.h of gcc 2.95/2.96 on redhat 7.3 platform

math.h of gcc 2.95/2.96 on redhat 7.3 platform

Post by weiwan » Mon, 27 Jan 2003 11:35:49



It seems to me that there is something not quite graceful at least
for the build of gcc 2.95 and 2.96 in redhat 7.3 release. For example,
if I include <math.h>, two problem appears.

(1) compiling code which declares

        double y0;

will give a warning message saying that "y0" shadows some global variable.
A detailed look tells

     extern   double          y0          (double )      ;

appears in the .i file.  Actually j0, j1, y0, y1 all become functions.

(2) a warning message

"  In file included from /usr/include/math.h:350,
                    from electro.c:6:
  /usr/include/bits/mathinline.h: In function `fabsf':
  /usr/include/bits/mathinline.h:446: warning: passing arg 1 of
  `__builtin_fabsf' as `float' rather than `double' due to prototype
"

Would someone tells me how to solve this problem ?

Wei

 
 
 

math.h of gcc 2.95/2.96 on redhat 7.3 platform

Post by Rouben Rostami » Mon, 27 Jan 2003 12:45:05




Quote:

>It seems to me that there is something not quite graceful at least
>for the build of gcc 2.95 and 2.96 in redhat 7.3 release. For example,
>if I include <math.h>, two problem appears.

>(1) compiling code which declares

>    double y0;

>will give a warning message saying that "y0" shadows some global variable.
>A detailed look tells

>     extern   double          y0          (double )      ;

>appears in the .i file.  Actually j0, j1, y0, y1 all become functions.

If you do "man y0", you will see that j0, j1, jn, y0, y1, yn
refer to Bessel functions of various kind in math.h.

Further down the man page you will see: "CONFORMING TO SVID 3, BSD 4.3".
Note the absence of ISO/ANSI in the "CONFORMING TO" line.

If you compile your program with "gcc -ansi ....", then the non-ISO
functions will be disabled and the warning message will go away.

Quote:>(2) a warning message

>"  In file included from /usr/include/math.h:350,
>                    from electro.c:6:
>  /usr/include/bits/mathinline.h: In function `fabsf':
>  /usr/include/bits/mathinline.h:446: warning: passing arg 1 of
>  `__builtin_fabsf' as `float' rather than `double' due to prototype
>"

This requires a bit more context to diagnose.

--


 
 
 

math.h of gcc 2.95/2.96 on redhat 7.3 platform

Post by Tim Princ » Mon, 27 Jan 2003 22:36:04



> It seems to me that there is something not quite graceful at least
> for the build of gcc 2.95 and 2.96 in redhat 7.3 release. For example,
> if I include <math.h>, two problem appears.

> (2) a warning message

> "  In file included from /usr/include/math.h:350,
>                     from electro.c:6:
>   /usr/include/bits/mathinline.h: In function `fabsf':
>   /usr/include/bits/mathinline.h:446: warning: passing arg 1 of
>   `__builtin_fabsf' as `float' rather than `double' due to prototype
> "

> Would someone tells me how to solve this problem ?

If you are passing a double argument to fabsf(), as the message indicates,
make it float, or use fabs().
--
Tim Prince
 
 
 

math.h of gcc 2.95/2.96 on redhat 7.3 platform

Post by weiwan » Tue, 28 Jan 2003 11:11:22


Quote:

> >(2) a warning message

> >"  In file included from /usr/include/math.h:350,
> >                    from electro.c:6:
> >  /usr/include/bits/mathinline.h: In function `fabsf':
> >  /usr/include/bits/mathinline.h:446: warning: passing arg 1 of
> >  `__builtin_fabsf' as `float' rather than `double' due to prototype
> >"

> This requires a bit more context to diagnose.

I don't use fabs, neither fabsf.  Whenever I include math.h,
it gives the above warning message.

Wei

 
 
 

math.h of gcc 2.95/2.96 on redhat 7.3 platform

Post by those who know me have no need of my nam » Wed, 29 Jan 2003 02:27:44


in comp.lang.c i read:

Quote:>> >"  In file included from /usr/include/math.h:350,
>> >                    from electro.c:6:
>> >  /usr/include/bits/mathinline.h: In function `fabsf':
>> >  /usr/include/bits/mathinline.h:446: warning: passing arg 1 of
>> >  `__builtin_fabsf' as `float' rather than `double' due to prototype
>I don't use fabs, neither fabsf.  Whenever I include math.h,
>it gives the above warning message.

the gnu libc project has lots of cruft in their headers.  add the -ansi
flag to your compilation and that warning will go away.

--
bringing you boring signatures for 17 years

 
 
 

1. upgrading gcc from 2.96 (yuk) to 3.x in RedHat 7.3

Hey everyone...

Just tried compiling MPlayer in my new "state of the art" (heh) Redhat
7.3 system, and lo and behold:


Detected operating system: Linux
Detected host architecture: i386
Checking for gcc version ... 2.96, bad
Checking for gcc3 version ... v. ?.??, bad

*** Please downgrade/upgrade C compiler to gcc-2.95.x or gcc-3.x
version! ***

You are using a different compiler than ours. We do not have the time to
make
sure everything works with compilers than the one we use.  Use either
use the
same compiler as ours, or use --disable-gcc-checking but DO *NOT* REPORT
BUGS
unless you can reproduce them after recompiling with 2.95.x or 3.0.x
version!

Note for gcc 2.96 users: some versions of this compiler are known to
miscompile
mplayer and lame (which is used for mencoder).  If you get compile errors,
first upgrade to the latest 2.96 release (but minimum 2.96-85) and try
again.
If the problem still exists, try with gcc 3.0.x (or 2.95.x) *BEFORE*
reporting
bugs!

         GCC 2.96 IS NOT AND WILL NOT BE SUPPORTED BY US !

      *** For details please read DOCS/gcc-2.96-3.0.html ***

Error: Bad gcc version

Check configure.log if you do not understand why it failed.

Hehe...  You'd think that RedHat would release the "Newest" and best
version of gcc with their new os release, eh?  Anyway, I downloaded the
base gcc rpm, and it required a bunch of other rpms & dependencies and
what not...  nobody ever said this was easy stuff.  :)  Has anyone out
there done this before successfully that wouldn't mind giving me
organized (not necessarily easy, but detailed) instructions?  Like, what
are the appropriate files to get and all that.

Your help is greatly appreciated.  Thanks!

-Matthew

-----

*To reply via e-mail, remove -NOSPAM from my address

2. want fast way to find if word is in a list

3. Upgrade gcc 2.96-98 to gcc 3.2-7 on Redhat 7.2

4. PPP authentication

5. RedHat trademark. First gcc 2.96 now this

6. Server Pack Up

7. Shared Libraries - Exceptions - GCC 2.96 - Redhat 8.0

8. Proxy server vs. IP Masquerade

9. Removing gcc 2.96 on RedHat

10. gcc 2.96 to compile redhat kernel 2.4.18-3?

11. gcc 2.96 vs. gcc 3.2: namespace, template incompatability

12. HOWTO build/install GCC 3.1 from SRPM w/o replacing GCC 2.96 ?

13. Problem compiling kernel 2.4.7 with gcc 2.96