summaryrefslogtreecommitdiff
path: root/numpy/f2py/tests/test_compile_function.py
diff options
context:
space:
mode:
authorJ. Lewis Muir <jlmuir@imca-cat.org>2018-09-13 15:36:08 -0500
committerJ. Lewis Muir <jlmuir@imca-cat.org>2018-09-14 11:16:27 -0500
commitc6566b7d3724fe59c5e72a0eb393676ee7b70cc1 (patch)
tree7b0b961b1d5d12df2da9153757ee86fecaa8ae33 /numpy/f2py/tests/test_compile_function.py
parent88cbd3d857db84cf820a6210fde14814f1d1d92b (diff)
downloadnumpy-c6566b7d3724fe59c5e72a0eb393676ee7b70cc1.tar.gz
MAINT: test NPY_INTERNAL_BUILD only if defined
When using GCC 4.4.7 on RHEL 6 to compile a C program that embeds Python and includes numpy/core/include/numpy/npy_common.h, and the compiler is configured to warn about all questionable constructions (-Wall) and warn about undefined identifiers (-Wundef), it will emit a warning like /tmp/python-2.7.15/lib/python2.7/site-packages/numpy/core/include/numpy/npy_common.h:17:5: warning: "NPY_INTERNAL_BUILD" is not defined The warning is because npy_common.h contains #if NPY_INTERNAL_BUILD #ifndef NPY_INLINE_MATH #define NPY_INLINE_MATH 1 #endif #endif Eliminate this warning by changing the #if expression to test NPY_INTERNAL_BUILD only if it is defined. (This preserves the original behavior because in the original, when NPY_INTERNAL_BUILD is undefined, the preprocessor treats it as 0 (false).)
Diffstat (limited to 'numpy/f2py/tests/test_compile_function.py')
0 files changed, 0 insertions, 0 deletions