From 203890574da95d16f8c453491026d349be4b2721 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 30 Mar 2007 14:31:44 +0000 Subject: * doublest.c (convert_floatformat_to_doublest): Use floatformat_classify. (floatformat_is_nan): Rename to... (floatformat_classify): ...this. Return more information. * doublest.h (enum float_kind): New. (floatformat_is_nan): Replace prototype... (floatformat_classify): ...with this one. * valprint.c (print_floating): Use floatformat_classify. Handle infinity. * gdb.base/infnan.c, gdb.base/infnan.exp: New files. --- gdb/testsuite/gdb.base/infnan.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 gdb/testsuite/gdb.base/infnan.c (limited to 'gdb/testsuite/gdb.base/infnan.c') diff --git a/gdb/testsuite/gdb.base/infnan.c b/gdb/testsuite/gdb.base/infnan.c new file mode 100644 index 0000000..4973663 --- /dev/null +++ b/gdb/testsuite/gdb.base/infnan.c @@ -0,0 +1,30 @@ +/* This test file is part of GDB, the GNU debugger. + + Copyright 2007 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +double a = 1.0/0.0; +double b = 0.0/0.0; +double c; + +int +main() +{ + c = a + b; + return 0; +} -- cgit v1.1