Silence a -Wunused warning about the junk variable being used to raise
an inexact floating point exception. The variable cannot be eliminated, unfortunately, otherwise the desired addition triggering the exception will be emitted neither by clang, nor by gcc. Reviewed by: Steve Kargl, bde MFC after: 3 days
This commit is contained in:
parent
73a73f7bd2
commit
3a462c983d
@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
|
||||
#define isinf(x) (fabs(x) == INFINITY)
|
||||
#undef isnan
|
||||
#define isnan(x) ((x) != (x))
|
||||
#define raise_inexact() do { volatile float junk = 1 + tiny; } while(0)
|
||||
#define raise_inexact() do { volatile float junk __unused = 1 + tiny; } while(0)
|
||||
#undef signbit
|
||||
#define signbit(x) (__builtin_signbit(x))
|
||||
|
||||
|
@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$");
|
||||
#define isinf(x) (fabsf(x) == INFINITY)
|
||||
#undef isnan
|
||||
#define isnan(x) ((x) != (x))
|
||||
#define raise_inexact() do { volatile float junk = 1 + tiny; } while(0)
|
||||
#define raise_inexact() do { volatile float junk __unused = 1 + tiny; } while(0)
|
||||
#undef signbit
|
||||
#define signbit(x) (__builtin_signbitf(x))
|
||||
|
||||
|
@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
|
||||
#define isinf(x) (fabsl(x) == INFINITY)
|
||||
#undef isnan
|
||||
#define isnan(x) ((x) != (x))
|
||||
#define raise_inexact() do { volatile float junk = 1 + tiny; } while(0)
|
||||
#define raise_inexact() do { volatile float junk __unused = 1 + tiny; } while(0)
|
||||
#undef signbit
|
||||
#define signbit(x) (__builtin_signbitl(x))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user