c/10844: Wrong computation on nan initialized vectors.

ehrhardt@mathematik.uni-ulm.de ehrhardt@mathematik.uni-ulm.de
Mon May 19 12:27:00 GMT 2003


Synopsis: Wrong computation on nan initialized vectors.

State-Changed-From-To: feedback->closed
State-Changed-By: cae
State-Changed-When: Mon May 19 12:01:16 2003
State-Changed-Why:
    Oh! I was about to believe you that this is a bug but it is not.
    The nan () function was introduced into math.h with the c99 standard
    but the default used by gcc is the c89 standard. With this standard the
    nan function is #ifdef'ed out intentionally. Hence there is no prototype
    for nan (as -Wall would have told you)! Hence gcc assumes that the
    return value of nan is int not double.
    
    Adding the prototype manually or using the -std=c99 option will make the
    problem go away.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10844



More information about the Gcc-bugs mailing list