https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122167
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I get a different warning:
<source>:3:22: warning: type attributes ignored after type is already defined
[-Wattributes]
3 | class [[deprecated]] Foo;
| ^~~
