summaryrefslogtreecommitdiff
path: root/numpy/distutils/command/autodist.py
diff options
context:
space:
mode:
authorE. M. Bray <erik.bray@lri.fr>2020-05-20 16:00:20 +0200
committerGitHub <noreply@github.com>2020-05-20 09:00:20 -0500
commitdcf1614dfc11f9004e408ed8c833980c951c541e (patch)
treeb6d552de4bbae7e0b6762160afdd0e4ae8601d22 /numpy/distutils/command/autodist.py
parentf6196441b7240c0fa862790efdfb1a62bf557744 (diff)
downloadnumpy-dcf1614dfc11f9004e408ed8c833980c951c541e.tar.gz
BLD: Avoid "visibility attribute not supported" warning (gh-16288)
I found that when building the latest master branch on Cygwin, while testing #16246, that thousands of warnings were generated at build time like: numpy/core/src/npysort/binsearch.c.src: In function ‘binsearch_left_bool’: numpy/core/src/npysort/binsearch.c.src:82:1: warning: visibility attribute not supported in this configuration; ignored [-Wattributes] Granted this is just a warning, so I don't think it's a serious issue. It seems the test that was supposed to check for __attribute__ support was not working as expected. The #pragmas only take effect if I provide a function body--they are ignored for bare declarations. I don't know if that's by intent, or if it's a GCC issue. For reference: $ gcc --version gcc (GCC) 7.4.0
Diffstat (limited to 'numpy/distutils/command/autodist.py')
-rw-r--r--numpy/distutils/command/autodist.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/distutils/command/autodist.py b/numpy/distutils/command/autodist.py
index 1475a5e24..8f6436004 100644
--- a/numpy/distutils/command/autodist.py
+++ b/numpy/distutils/command/autodist.py
@@ -69,7 +69,10 @@ def check_gcc_function_attribute(cmd, attribute, name):
#pragma GCC diagnostic error "-Wattributes"
#pragma clang diagnostic error "-Wattributes"
- int %s %s(void*);
+ int %s %s(void* unused)
+ {
+ return 0;
+ }
int
main()