Skip to content
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

warning: ‘Corrade::Utility::Arguments’ declared with greater visibility than the type of its field #126

Open
jonesmz opened this issue Feb 5, 2022 · 2 comments
Milestone

Comments

@jonesmz
Copy link

jonesmz commented Feb 5, 2022

This isn't really negatively effecting me, but I noticed it in my build.

/home/jonesmz/osp-magnum-rmlui/3rdparty/corrade/src/Corrade/Utility/Arguments.h:173:30: warning: ‘Corrade::Utility::Arguments’ declared with greater visibility than the type of its field ‘Corrade::Utility::Arguments::_entries’ [-Wattributes]
  173 | class CORRADE_UTILITY_EXPORT Arguments {
      |                              ^~~~~~~~~
@mosra mosra added this to the 2022.0a milestone Feb 6, 2022
@mosra
Copy link
Owner

mosra commented Feb 6, 2022

Huh, I don't remember getting any similar warning locally. This is when you're including the header from your project, not when building Corrade itself, right?

GCC or Clang? Dynamic or static build? Any special flags you're setting in the superproject, like having -fvisibility=hidden but not -fvisibility-inlines-hidden? Does the error go away if you set neither or both?

@jonesmz
Copy link
Author

jonesmz commented Feb 13, 2022

Apologies for the delay

This CI run reproduces the issue:

https://github.com/TheOpenSpaceProgram/osp-magnum/runs/5082236623?check_suite_focus=true#step:7:137

Looks like it only happens when we include the file in one of our cpp files, and only with gcc and not clang (at least with the flags we're feeding them), and only on linux. Doesn't appear to happen on windows or macos. (Though we do get plenty of warnings building magnum on MSVC with -DCMAKE_SYSTEM_VERSION="10.0.19041.0", i just haven't gone through them to report issues yet, but you can look if you feel like it : https://github.com/TheOpenSpaceProgram/osp-magnum/runs/5082236880?check_suite_focus=true#step:10:51 )

In file included from /home/runner/work/osp-magnum/osp-magnum/src/test_application/main.cpp:48:
/home/runner/work/osp-magnum/osp-magnum/3rdparty/corrade/src/Corrade/Utility/Arguments.h:173:30: warning: ‘Corrade::Utility::Arguments’ declared with greater visibility than the type of its field ‘Corrade::Utility::Arguments::_entries’ [-Wattributes]
  173 | class CORRADE_UTILITY_EXPORT Arguments {
      |                              ^~~~~~~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: TODO
Development

No branches or pull requests

2 participants