https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84347
--- Comment #2 from Martin Sebor ---
Both Clang and Intel ICC behave as expected:
t.C(3): warning #1478: class "A" (declared at line 1) was declared
deprecated
A aci; // -Wdeprecated-declarations (good)
^
t.C(11): warning #1478: variable "V [with T=int *]" (declared at line 5) was
declared deprecated
(void)V;// -Wdeprecated-declarations (good)
^
t.C(18): warning #1478: class "B" (declared at line 14) was declared
deprecated
B bpi;// missing -Wdeprecated-declarations
^
Compiler returned: 0