https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116954
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:3e448005c51320801c0e2fa6ddf577da51cec7c7 commit r16-113-g3e448005c51320801c0e2fa6ddf577da51cec7c7 Author: Jason Merrill <ja...@redhat.com> Date: Thu Apr 24 05:15:01 2025 -0400 c++: attribute duplication [PR116954] As a followup to the previous patch for 116954, there's no reason to do anything in remove_contract_attributes if contracts aren't enabled. PR c++/116954 gcc/cp/ChangeLog: * contracts.cc (remove_contract_attributes): Return early if not enabled.