https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121696
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Have you tried GCC 15? There has been some fixes with respect to `#pragma GCC target` in GCC 15 with respect to C++ for defines. I almost suspect that should fix it.