Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint1 Use !finite() instead of isinf() in two ...



details:   https://anonhg.NetBSD.org/src/rev/1a8a1ee40e79
branches:  trunk
changeset: 521521:1a8a1ee40e79
user:      tv <tv%NetBSD.org@localhost>
date:      Thu Jan 31 22:30:20 2002 +0000

description:
Use !finite() instead of isinf() in two places for better compatibility.

diffstat:

 usr.bin/xlint/lint1/scan.l |  6 +++---
 usr.bin/xlint/lint1/tree.c |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (55 lines):

diff -r ca84765d1ab3 -r 1a8a1ee40e79 usr.bin/xlint/lint1/scan.l
--- a/usr.bin/xlint/lint1/scan.l        Thu Jan 31 22:17:33 2002 +0000
+++ b/usr.bin/xlint/lint1/scan.l        Thu Jan 31 22:30:20 2002 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: scan.l,v 1.25 2002/01/31 19:36:54 tv Exp $ */
+/* $NetBSD: scan.l,v 1.26 2002/01/31 22:30:21 tv Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: scan.l,v 1.25 2002/01/31 19:36:54 tv Exp $");
+__RCSID("$NetBSD: scan.l,v 1.26 2002/01/31 22:30:21 tv Exp $");
 #endif
 
 #include <stdlib.h>
@@ -686,7 +686,7 @@
 
        if (typ == FLOAT) {
                f = (float)d;
-               if (isinf(f)) {
+               if (!finite(f)) {
                        /* floating-point constant out of range */
                        warning(248);
                        f = f > 0 ? FLT_MAX : -FLT_MAX;
diff -r ca84765d1ab3 -r 1a8a1ee40e79 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Thu Jan 31 22:17:33 2002 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Thu Jan 31 22:30:20 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tree.c,v 1.23 2002/01/31 19:36:54 tv Exp $     */
+/*     $NetBSD: tree.c,v 1.24 2002/01/31 22:30:20 tv Exp $     */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -33,7 +33,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.23 2002/01/31 19:36:54 tv Exp $");
+__RCSID("$NetBSD: tree.c,v 1.24 2002/01/31 22:30:20 tv Exp $");
 #endif
 
 #include <stdlib.h>
@@ -2886,7 +2886,7 @@
 
        if (isnan((double)v->v_ldbl))
                lerror("foldflt() 5");
-       if (isinf((double)v->v_ldbl) ||
+       if (!finite((double)v->v_ldbl) ||
            (t == FLOAT &&
             (v->v_ldbl > FLT_MAX || v->v_ldbl < -FLT_MAX)) ||
            (t == DOUBLE &&



Home | Main Index | Thread Index | Old Index