https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79078
Bug ID: 79078 Summary: Warnings from deprecated attribute are too noisy Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- struct [[deprecated("D is bad mmmkay")]] D { }; int main() { D d1, d2; } This warns twice, because of the two variables. Once is probably enough. d.cc: In function ‘int main()’: d.cc:4:5: warning: ‘D’ is deprecated: D is bad mmmkay [-Wdeprecated-declarations] D d1, d2; ^~ d.cc:1:42: note: declared here struct [[deprecated("D is bad mmmkay")]] D { }; ^ d.cc:4:9: warning: ‘D’ is deprecated: D is bad mmmkay [-Wdeprecated-declarations] D d1, d2; ^~ d.cc:1:42: note: declared here struct [[deprecated("D is bad mmmkay")]] D { }; ^