Skip to content

CheckerGccPlugins: Allow declaring constructors / destructors as not-thread-safe.

Allow attaching a not_thread_safe attribute to constructors and destructors.

This is actually a bit annoying, because gcc versions prior to 10 will not accept a c++11-style attribute after a ctor/dtor declaration. It will accept the attribute form, except that in that case, one can't use a scoped attribute. So need to introduce an alias for ATLAS::not_thread_safe, called ATLAS_not_thread_safe. As a result of this, we also need to introduce a separate macro to use in this context: ATLAS_CTORDTOR_NOT_THREAD_SAFE.

At this point, we also change the gnu:: prefix on the attributes in checker_macros.h to ATLAS::. (Prior to gcc version 7, one could not use a prefix other than gnu::.)

Merge request reports