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

Compilation problem: error: 'visibility' attribute ignored when parsing type (enum) #25

Open
g7fernandes opened this issue Dec 24, 2020 · 0 comments · May be fixed by #26
Open

Compilation problem: error: 'visibility' attribute ignored when parsing type (enum) #25

g7fernandes opened this issue Dec 24, 2020 · 0 comments · May be fixed by #26

Comments

@g7fernandes
Copy link

In file included from /home/gabriel/git/capicxx-core-runtime/src/CommonAPI/Address.cpp:10:
/home/gabriel/git/capicxx-core-runtime/include/CommonAPI/Logger.hpp:31:37: error: 'visibility' attribute ignored when parsing type [-Werror,-Wignored-attributes]
    enum class Level : std::uint8_t COMMONAPI_EXPORT {
                                    ^~~~~~~~~~~~~~~~
/home/gabriel/git/capicxx-core-runtime/include/CommonAPI/Export.hpp:19:46: note: expanded from macro 'COMMONAPI_EXPORT'
    #define COMMONAPI_EXPORT __attribute__ ((visibility ("default")))
                                             ^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/CommonAPI.dir/build.make:63: CMakeFiles/CommonAPI.dir/src/CommonAPI/Address.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:132: CMakeFiles/CommonAPI.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

I'm using Ubuntu 20.04 and the last release of Common API (3.2).

barbieri added a commit to barbieri/capicxx-core-runtime that referenced this issue May 8, 2021
The structure is declared in the header and the export is unused as seen
with clang and -Wignored-attributes:

CommonAPI-3.2/CommonAPI/Logger.hpp:31:37: warning: 'visibility' attribute ignored when parsing type [-Wignored-attributes]
    enum class Level : std::uint8_t COMMONAPI_EXPORT {
                                    ^~~~~~~~~~~~~~~~
CommonAPI-3.2/CommonAPI/Export.hpp:19:46: note: expanded from macro 'COMMONAPI_EXPORT'
    #define COMMONAPI_EXPORT __attribute__ ((visibility ("default")))
                                             ^~~~~~~~~~~~~~~~~~~~~~

Closes: COVESA#25

Signed-off-by: Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
@barbieri barbieri linked a pull request May 8, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant