mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-25 16:29:03 +00:00
Fix dll linking warnings for VS 2015/17 (#467)
-- #ifdef out duplicate definitions -- remove make_nan() dead code
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#if ! defined( __INTEL_COMPILER )
|
||||
#if _MSC_VER < 1900 && ! defined( __INTEL_COMPILER )
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -276,6 +276,8 @@ int SIGNBIT_DP64(double x )
|
||||
}
|
||||
#endif
|
||||
|
||||
#if _MSC_VER < 1900
|
||||
|
||||
/* fmax(x, y) returns the larger (more positive) of x and y.
|
||||
NaNs are treated as missing values: if one argument is NaN,
|
||||
the other argument is returned. If both arguments are NaN,
|
||||
@@ -560,6 +562,7 @@ long int lrintf (float x)
|
||||
return (long int) x;
|
||||
}
|
||||
|
||||
#endif // _MSC_VER < 1900
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -589,20 +592,7 @@ int feclearexcept(int excepts)
|
||||
|
||||
#endif // __INTEL_COMPILER
|
||||
|
||||
#if ! defined( __INTEL_COMPILER ) || __INTEL_COMPILER < 1300
|
||||
|
||||
float make_nan()
|
||||
{
|
||||
/* This is the IEEE 754 single-precision format:
|
||||
unsigned int mantissa: 22;
|
||||
unsigned int quiet_nan: 1;
|
||||
unsigned int exponent: 8;
|
||||
unsigned int negative: 1;
|
||||
*/
|
||||
//const static unsigned
|
||||
static const int32_t _nan = 0x7fc00000;
|
||||
return *(const float*)(&_nan);
|
||||
}
|
||||
#if _MSC_VER < 1900 && ( ! defined( __INTEL_COMPILER ) || __INTEL_COMPILER < 1300 )
|
||||
|
||||
float nanf( const char* str)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user