From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3981 invoked by alias); 19 May 2003 12:01:16 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 3962 invoked by uid 48); 19 May 2003 12:01:16 -0000 Date: Mon, 19 May 2003 12:01:00 -0000 Message-ID: <20030519120116.3961.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, szegedy@or.uni-bonn.de From: ehrhardt@mathematik.uni-ulm.de Reply-To: ehrhardt@mathematik.uni-ulm.de, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, szegedy@or.uni-bonn.de, gcc-gnats@gcc.gnu.org Subject: Re: c/10844: Wrong computation on nan initialized vectors. X-SW-Source: 2003-05/txt/msg02069.txt.bz2 List-Id: 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