10000 BLD: Avoid "visibility attribute not supported" warning. by charris · Pull Request #16343 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BLD: Avoid "visibility attribute not supported" warning. #16343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2020

Conversation

charris
Copy link
Member
@charris charris commented May 22, 2020

Backport of #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

I found that when building the latest master branch on Cygwin, while
testing numpy#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
@charris charris added this to the 1.19.0 release milestone May 22, 2020
@charris charris merged commit 5dc2f55 into numpy:maintenance/1.19.x May 22, 2020
@charris charris deleted the backport-16288 branch May 22, 2020 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0