[Bug c++/79078] Warnings from deprecated attribute are too noisy

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 13 00:24:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79078

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Then we get _another_ warning on the definition of that member function:

struct [[deprecated("D is bad mmmkay")]] D {
  void f(const D&);
};

void D::f(const D&) { }


d.cc:2:18: warning: ‘D’ is deprecated [-Wdeprecated-declarations]
   void f(const D&);
                  ^
d.cc:5:19: warning: ‘D’ is deprecated [-Wdeprecated-declarations]
 void D::f(const D&) { }
                   ^


More information about the Gcc-bugs mailing list