I wrote: > I'm very hesitant to apply a volatile-qualification approach to > eliminate those issues, for fear of pessimizing performance-critical > code on more modern platforms. I wonder whether there is a reasonable > way to tell at compile time if we have a platform with 80-bit math.
Hmmm ... I find that dromedary's compiler predefines __FLT_EVAL_METHOD__ as 2 not 0 when -mfpmath=387 is given. This seems to be something that was standardized in C99 (without the double underscores), so maybe we could do something like #if __FLT_EVAL_METHOD__ > 0 || FLT_EVAL_METHOD > 0 to conditionalize whether we try to force the evaluation width in check_float8_val and check_float4_val. regards, tom lane