File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ option(USE_FLOAT_EXCEPTIONS "Use floating point exceptions" OFF)
153153option (USE_FAST_MATH "Use fast math" ON )
154154
155155if (USE_FLOAT_EXCEPTIONS)
156- add_definitions (-DDAEMON_USE_FLOAT_EXCEPTIONS)
156+ add_definitions ( -DDAEMON_USE_FLOAT_EXCEPTIONS )
157157endif ()
158158
159159if (MSVC )
Original file line number Diff line number Diff line change @@ -300,7 +300,6 @@ static void CloseSingletonSocket()
300300
301301static void SetFloatingPointExceptions ()
302302{
303- // Must be done after Sys::Init() to read cvars from command line.
304303 #if defined(DAEMON_USE_FLOAT_EXCEPTIONS_AVAILABLE)
305304 #if defined(__USE_GNU) || defined(__APPLE__)
306305 int exceptions = 0 ;
@@ -359,6 +358,13 @@ static void SetFloatingPointExceptions()
359358 _controlfp_s (¤t, exceptions, _MCW_EM);
360359 #endif
361360 #endif
361+ // TODO: remove it.
362+ #if 1
363+ const float x = -1 .0f ;
364+ const float f = 0 .0f ;
365+ printf (" %f\n " , sqrt (x));
366+ printf (" %f\n " , 1 /f);
367+ #endif
362368}
363369
364370// Common code for fatal and non-fatal exit
You can’t perform that action at this time.
0 commit comments