https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106759
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>: https://gcc.gnu.org/g:29dfe1cacadd2a47b4e5b1cab11bd7263fe211c9 commit r12-8729-g29dfe1cacadd2a47b4e5b1cab11bd7263fe211c9 Author: Marek Polacek <pola...@redhat.com> Date: Mon Aug 29 16:54:05 2022 -0400 c++: __has_builtin gives the wrong answer [PR106759] We've supported __is_nothrow_constructible since r11-4386, but names_builtin_p didn't know about it, so it gave the wrong answer for #if __has_builtin(__is_nothrow_constructible) ... #endif I've tested all C++-only built-ins and only two were missing. PR c++/106759 gcc/cp/ChangeLog: * cp-objcp-common.cc (names_builtin_p): Handle RID_IS_NOTHROW_ASSIGNABLE and RID_IS_NOTHROW_CONSTRUCTIBLE. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: New test. (cherry picked from commit fe915f35b7d8dc768a2b977c09aa02f933e1d1e9)