I am not sure whether having a struct fully implemented in the header file will make any difference on its need of __attribute__(( visibility("default"))) when being used as part of a shared library.
2 Answers
If you're compiling with
-fvisibility=hidden
All the exported functions and variables set to visibility default and so usable by the user of your shared library will appear when executing :
nm -C -D <library>.so
Then you can see the differences when you set it to default and when you don't.
2 Comments
FCR
This doesn't quite answer the question. The question is whether it makes any differences for structs with all of its implementation made in the header file. The argument I was given is that the "header file is shipped anyway along with the library, so no need to use visibility default on those structs" ...
Glick
Visibility is just to set or not the symbol in the shared library so that it can be use after, if there is no need to set it to default then there is no change to set it or not