X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=src%2Fmain.cpp;h=f1833034b9b674eb3428813bc52340e20ecb5e1d;hb=a69d8466e4ad4dd92488798582e680ae31029038;hp=848debc0ff7fedd8e25c48459444e375b48a2337;hpb=d9c0c3792133f87cd224dc22be428be8ddc016d8;p=ipdf%2Fcode.git diff --git a/src/main.cpp b/src/main.cpp index 848debc..f183303 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,6 +3,10 @@ #include "controlpanel.h" +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif +#include int main(int argc, char ** argv) @@ -11,6 +15,8 @@ int main(int argc, char ** argv) Warn("__STDC_IEC_559__ not defined. IEEE 754 floating point not fully supported.\n"); #endif + // We want to crash if we ever get a NaN. + feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW); Debug("Compiled with REAL = %d => \"%s\" sizeof(Real) == %d bytes", REAL, g_real_name[REAL], sizeof(Real));