https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95727
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- pragma poison actually does one step further, it poisons it during the preprocessing stage. What you are proposing is slightly different. It is more deprecated attribute but slightly different.