[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] trivial patch to fix fenv test compilation under Linux

From: Vadim Zeitlin
Subject: [lmi] trivial patch to fix fenv test compilation under Linux
Date: Wed, 24 Mar 2010 00:20:17 +0100

 Hello (Greg),

 Could you please apply the following trivial patch?

--- a/fenv_lmi_test.cpp
+++ b/fenv_lmi_test.cpp
@@ -44,6 +44,8 @@

 #include "test_tools.hpp"

+#include <math.h> // rint()
 #include <bitset>
 #include <climits> // CHAR_BIT
 #if defined LMI_IEC_559 || defined __MINGW32__

AFAICS it can't break anything (yes, I had said this before... but this
time I'm really sure about it (even more so than the previous ones)) and it
allows the calls to rint() to compile under Linux. It's a bit of a mystery
to me why does it compile with MinGW without it as rint() is declared in
math.h there as well and the test currently only includes float.h which
does not include math.h but in any case, including math.h shouldn't hurt
there neither.

 With this patch (and a couple of changes in Makefile.am which I'm going to
commit myself to svn if you don't object) all tests compile under Linux
again now. Unfortunately they still don't pass, even this one fails with

        **** test failed:   '-3' == '-2'
        [file fenv_lmi_test.cpp, line 211]

        **** test failed:   '1' == '2'
        [file fenv_lmi_test.cpp, line 213]

        **** test failed:   '-1' == '-2'
        [file fenv_lmi_test.cpp, line 221]

        **** test failed:   '3' == '2'
        [file fenv_lmi_test.cpp, line 223]

        **** test failed:   '-1' == '-2'
        [file fenv_lmi_test.cpp, line 230]

        **** test failed:   '1' == '2'
        [file fenv_lmi_test.cpp, line 231]

(note that the line numbers are offset by the above patch compared to the
svn version) but I ran out of time to investigate it today.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]