Skip to content

Commit 10070cb

Browse files
committed
test
1 parent 0d12b3f commit 10070cb

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

cmake/DaemonFlags.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ option(USE_FLOAT_EXCEPTIONS "Use floating point exceptions" OFF)
153153
option(USE_FAST_MATH "Use fast math" ON)
154154

155155
if (USE_FLOAT_EXCEPTIONS)
156-
add_definitions(-DDAEMON_USE_FLOAT_EXCEPTIONS)
156+
add_definitions( -DDAEMON_USE_FLOAT_EXCEPTIONS )
157157
endif()
158158

159159
if (MSVC)

src/engine/framework/System.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ static void CloseSingletonSocket()
300300

301301
static 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(&current, 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

0 commit comments

Comments
 (0)