All good and fine, but come out of the bush and let us know that you
never do any floating point stuff at all.
It is entirely reasonable to expect this to work:
// --------------------------------------------------------------------------
#include <whateveritis.h>
static const long double l = LDBL_MIN;
// _static_ rounding mode, btw., since that was a static.
int main ()
{
assert (l != 0);
return 0;
}
// --------------------------------------------------------------------------
That leaves you two choices:
1. Target==host, i.e., no run-time or compile-time switchability.
2. Emulation.
(1) isn't too bad to live with as long as you can cross-compile enough
to bootstrap. gcc pretends to be a serious cross-compilation setup so
they really have no choice but to do (2).
Oh, and your sample program is pointless for this discussion: what you are
observing is that printf produces different results for the same argument
depending on rounding mode. Your "hide" function is called before you set
rounding mode so it has no effect whatsoever.
M.
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html