From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30876 invoked by alias); 6 Jan 2002 18:36:01 -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 30856 invoked by uid 71); 6 Jan 2002 18:36:01 -0000 Date: Sun, 06 Jan 2002 10:36:00 -0000 Message-ID: <20020106183601.30855.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "Knox S. Long" Subject: Re: c/5277: NaN unexpectedly Reply-To: "Knox S. Long" X-SW-Source: 2002-01/txt/msg00273.txt.bz2 List-Id: The following reply was made to PR c/5277; it has been noted by GNATS. From: "Knox S. Long" To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, long@stsci.edu, gcc-bugs@gcc.gnu.org Cc: Subject: Re: c/5277: NaN unexpectedly Date: Sun, 06 Jan 2002 13:33:49 -0500 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5277 Mea culpa! I now understand the cause of this problem and I don't know whether it is a bug or not. In all of the cases in which this problem appeared, it was in a function which had been declared as a double, e.g. double thierry_velocity (x, v) double x[]; double v[]; { int n; ... In this particular case what was being calculated was a velocity v from a position x. The routine was returning the speed, which is simply a double precision number. In this and all of the other cases where I observed this problem, the routine had not been declared as a double in the calling routine (since I was not actually interested in the returned value). Once this was done the program, all spurious instances on Nan disappeared. I have no idea of course whether this is the expected performance of gcc, though certainly the problem is not dire for me if it is. It was lesson to me to use -Wall on anything I really seriously care about. I apologize to anyone this has inconvenienced. Sincerely, Knox Long