Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix AIX compilation issue with NAN and INFINITY #3043
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3043 +/- ##
==========================================
+ Coverage 90.87% 90.87% +<.01%
==========================================
Files 61 61
Lines 11734 11740 +6
==========================================
+ Hits 10663 10669 +6
Misses 1071 1071
Continue to review full report at Codecov.
|
|
Hi, thanks for catching that, appreciate your PR.
Also note that we have Contributing wiki which describes how to make PR. |
|
Thanks. I have updated the PR as per your info. |
|
LGTM |
We have recently ported R to AIX .
https://www.ibm.com/developerworks/aix/library/aix-toolbox/alpha.html#R
When trying to install data.table, there is a compilation issue with NAN and INFINITY.
fread.c:79:28: error: initializer element is not constant
static const double NAND = (double)NAN;
^
fread.c:80:28: error: initializer element is not constant
static const double INFD = (double)INFINITY;
^
With gcc -E option , we see this
static const unsigned int _SINFINITY = 0x7f800000;
static const unsigned int _SQNAN = 0x7fc00000;
static const double NAND = (double)
79 "fread.c" 3 4
(*((float )(&_SQNAN)))
79 "fread.c"
;
static const double INFD = (double)
80 "fread.c" 3 4
(((float *)(&_SINFINITY)))
80 "fread.c"
So they don't seem to qualify as constant literals hence the compilation issue.
I have tested the fix in Linux as well.