From: stevenj Date: Fri, 13 Nov 2009 00:43:18 +0000 (-0500) Subject: add (disabled) code to test program to signal on NaN creation, for debugging X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=f06ae0e360043305f3b9c0e25a98f70ff76a337b;p=nlopt.git add (disabled) code to test program to signal on NaN creation, for debugging darcs-hash:20091113004318-c8de0-9d518702b3a469dfd45197b08f06f255c5175f06.gz --- diff --git a/test/testopt.cpp b/test/testopt.cpp index 0345ea8..f00083a 100644 --- a/test/testopt.cpp +++ b/test/testopt.cpp @@ -12,6 +12,13 @@ # include #endif +#define USE_FEENABLEEXCEPT 0 +#if USE_FEENABLEEXCEPT +# include +extern "C" int feenableexcept (int EXCEPTS); +#endif + + #include "nlopt.h" #include "nlopt-util.h" #include "testfuncs.h" @@ -237,6 +244,10 @@ int main(int argc, char **argv) if (argc <= 1) usage(stdout); + +#if USE_FEENABLEEXCEPT + feenableexcept(FE_INVALID); +#endif while ((c = getopt(argc, argv, "hLvCc0:r:a:o:i:e:t:x:X:f:F:m:")) != -1) switch (c) {