[Bug c++/84222] [[deprecated]] class complains about internal class usage

2018-02-05 Thread gcc-bugzilla at daryl dot haresign.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84222

--- Comment #2 from Daryl Haresign  ---
See also bug 79817.

[Bug c++/84222] [[deprecated]] class complains about internal class usage

2018-02-05 Thread gcc-bugzilla at daryl dot haresign.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84222

--- Comment #1 from Daryl Haresign  ---
Additionally, any external use of a static method of a deprecated class should
probably (but does not currently) emit a warning (Clang emits a warning).

class [[deprecated]] C {
  public:
void fn() {}
};

int main()
{
C::fn();  // does not emit a deprecation warning
}