mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Enable -Werror for GCC/Clang builds (#786)
* Enable -Werror for GCC/Clang builds Fixes many of the errors this produces, and disables a handful that didn't have solutions that were obvious (to me). * Check for `-W*` flags empirically * Remove cl_APPLE_fp64_basic_ops support * Undo NAN conversion fix * Add comments to warning override flags * Remove unneeded STRINGIFY definition * Fix tautological compare issue in basic * Use ABS_ERROR macro in image tests * Use fabs for ABS_ERROR macro * Move ABS_ERROR definition to common header
This commit is contained in:
@@ -37,39 +37,6 @@
|
||||
#define EVALUATE( x ) x
|
||||
#define CONCATENATE(x, y) x ## EVALUATE(y)
|
||||
|
||||
|
||||
// Declare Classification macros for non-C99 platforms
|
||||
#ifndef isinf
|
||||
#define isinf(x) ( sizeof (x) == sizeof(float ) ? fabsf(x) == INFINITY \
|
||||
: sizeof (x) == sizeof(double) ? fabs(x) == INFINITY \
|
||||
: fabsl(x) == INFINITY)
|
||||
#endif
|
||||
|
||||
#ifndef isfinite
|
||||
#define isfinite(x) ( sizeof (x) == sizeof(float ) ? fabsf(x) < INFINITY \
|
||||
: sizeof (x) == sizeof(double) ? fabs(x) < INFINITY \
|
||||
: fabsl(x) < INFINITY)
|
||||
#endif
|
||||
|
||||
#ifndef isnan
|
||||
#define isnan(_a) ( (_a) != (_a) )
|
||||
#endif
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#undef isnormal
|
||||
#endif
|
||||
|
||||
#ifndef isnormal
|
||||
#define isnormal(x) ( sizeof (x) == sizeof(float ) ? (fabsf(x) < INFINITY && fabsf(x) >= FLT_MIN) \
|
||||
: sizeof (x) == sizeof(double) ? (fabs(x) < INFINITY && fabs(x) >= DBL_MIN) \
|
||||
: (fabsl(x) < INFINITY && fabsl(x) >= LDBL_MIN) )
|
||||
#endif
|
||||
|
||||
#ifndef islessgreater
|
||||
// Note: Non-C99 conformant. This will trigger floating point exceptions. We don't care about that here.
|
||||
#define islessgreater( _x, _y ) ( (_x) < (_y) || (_x) > (_y) )
|
||||
#endif
|
||||
|
||||
#pragma STDC FP_CONTRACT OFF
|
||||
static void __log2_ep(double *hi, double *lo, double x);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user