From: Richard Kenner Date: Mon, 18 Apr 1994 19:25:32 +0000 (-0400) Subject: (yylex): If FP value is NaN, use value of zero. X-Git-Tag: misc/cutover-egcs-0~6872 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a47a0ed53b1068e5100befb6bb6b7d5af211a382;p=thirdparty%2Fgcc.git (yylex): If FP value is NaN, use value of zero. From-SVN: r7071 --- diff --git a/gcc/c-lex.c b/gcc/c-lex.c index 997e9a0fcdc1..ad34e601327b 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -1407,6 +1407,12 @@ yylex () if (garbage_chars > 0) error ("garbage at end of number"); + /* If the result is not a number, assume it must have been + due to some error message above, so silently convert + it to a zero. */ + if (REAL_VALUE_ISNAN (value)) + value = dconst0; + /* Create a node with determined type and value. */ if (imag) yylval.ttype = build_complex (convert (type, integer_zero_node),