https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96117
Bug ID: 96117 Summary: Cannot mix c++11-style and GCC-style attributes Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: steveire at gmail dot com Target Milestone: --- ``` struct __attribute__((visibility("default"))) [[deprecated("a message")]] A1 { }; struct __attribute__((__deprecated__("a message"))) __attribute__((visibility("default"))) A2 { }; ``` A EXPORT macro containing a GCC-style visibility attribute (generated by CMake) and another macro containing a c++11-style macro can not be used to decorate a class. https://godbolt.org/z/qHxr6s