https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96485
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- [[gnu::no_sanitize_undefined]] instead of the GNU __attribute__ is accepted, but as the C++ specification requires it applies to the type not the declaration and therefore it is ignored.