changeset 12089:f859b61b8bf4 release-3-2-x

abort if floating point format is not recognized as IEEE
author John W. Eaton <jwe@octave.org>
date Wed, 09 Sep 2009 14:15:04 +0200
parents 22395d0870fd
children f12b581a1572
files liboctave/ChangeLog liboctave/lo-ieee.cc
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/ChangeLog	Wed Sep 09 14:14:32 2009 +0200
+++ b/liboctave/ChangeLog	Wed Sep 09 14:15:04 2009 +0200
@@ -1,3 +1,8 @@
+2009-08-31  John W. Eaton  <jwe@octave.org>
+
+	* liboctave/lo-ieee.cc (octave_ieee_init): Abort if floating point
+	format is not recognized as IEEE.
+
 2009-08-19  Jaroslav Hajek  <highegg@gmail.com>
 
 	* Array-util.cc (zero_dims_inquire): Add matching ndims case.
--- a/liboctave/lo-ieee.cc	Wed Sep 09 14:14:32 2009 +0200
+++ b/liboctave/lo-ieee.cc	Wed Sep 09 14:15:04 2009 +0200
@@ -157,13 +157,12 @@
     case oct_mach_info::flt_fmt_cray:
     case oct_mach_info::flt_fmt_vax_d:
     case oct_mach_info::flt_fmt_vax_g:
-      break;
-
     default:
       // If the format is unknown, then you will probably not have a
       // useful system, but we will just issue a warning and go on...
-      (*current_liboctave_warning_handler)
-	("lo_ieee_init: unrecognized floating point format!");
+      (*current_liboctave_error_handler)
+	("lo_ieee_init: floating point format is not IEEE!  Maybe DLAMCH is miscompiled, or you are using some strange system without IEEE floating point math?");
+      abort ();
     }
 }