[Bug c++/77777] Use rich location to mark correct expression for "invalid use of non-static member function"

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 16 12:23:00 GMT 2018


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2017-08-22 00:00:00         |2018-3-16

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Hmm, in PR 77711 I claimed to have a fix for this, but I don't know what
happened to that.

Anyway, here's what Clang says:

loc.cc:11:9: error: reference to non-static member function must be called; did
you mean to call it with no arguments?
      x.f
      ~~^
         ()
1 error generated.


More information about the Gcc-bugs mailing list