You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -Os -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c reproject/overlapArea.c -o build/temp.macosx-10.9-x86_64-2.7/reproject/overlapArea.o
reproject/overlapArea.c:1262:7: warning: 'finite' is deprecated: first deprecated in OS X 10.9 [-Wdeprecated-declarations]
if(mNaN(area) || area < 0.)
^
reproject/mNaN.h:7:30: note: expanded from macro 'mNaN'
#define mNaN(x) isnan(x) || !finite(x)
^
/usr/include/math.h:718:12: note: 'finite' declared here
extern int finite(double) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_NA, __IPHONE_NA);
^
1 warning generated.
I'll have to look around what the proper and equivalent way of handling NaNs in this way is unless someone else knows.
Tests with input NaNs should be in place first.
The text was updated successfully, but these errors were encountered:
I think finite should be replaced by isfinite, but not sure whether only very recent compilers support it. If so, we shouldn't make this change yet. Maybe @bluescarni can clarify whether this change would be safe?
By default, GCC provides some extensions to the C language that on rare occasions conflict with the C standard. See Extensions to the C Language Family. Use of the -std options listed above will disable these extensions where they conflict with the C standard version selected. You may also select an extended version of the C language explicitly with -std=gnu90 (for C90 with GNU extensions), -std=gnu99 (for C99 with GNU extensions) or -std=gnu11 (for C11 with GNU extensions). The default, if no C language dialect options are given, is -std=gnu90; this is intended to change to -std=gnu11 in some future release. Some features that are part of the C99 standard are accepted as extensions in C90 mode, and some features that are part of the C11 standard are accepted as extensions in C90 and C99 modes.
So it seems to depend on what kind of compiler flags are passed by distutils down to the compiler, at least in the case of GCC. On OSX I would expect clang to follow more or less what GCC does.
On Windows, MSVC notoriously has poor C99 support, especially in earlier versions (the latest ones seem to have better support).
Pragmatically, for GCC my first choice would be to see if it "just works" in gnu90 mode -- maybe the macro is included in the extensions mentioned above. This seems to be the case on my machine:
#include <math.h>
int main()
{
isfinite(4.5);
}
This compiles fine on my machine without extra switches (GCC 4.9). This is the type of things that, generally speaking, should be tested when configuring the build system.
I get this warning in the build:
I'll have to look around what the proper and equivalent way of handling
NaNs
in this way is unless someone else knows.Tests with input
NaN
s should be in place first.The text was updated successfully, but these errors were encountered: