This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77777] Use rich location to mark correct expression for "invalid use of non-static member function"
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 28 Sep 2016 16:31:32 +0000
- Subject: [Bug c++/77777] Use rich location to mark correct expression for "invalid use of non-static member function"
- Auto-submitted: auto-generated
- References: <bug-77777-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77777
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to David Malcolm from comment #1)
> (In reply to Jonathan Wakely from comment #0)
> > There are lots of cases where we should use rich locations, but here's one
> Do you mean a fix-it hint?
I don't think so, but maybe I do :-)
What I mean is we should display something like:
c.cc:12:4: error: invalid use of non-static member function ‘int X::f()’
x.f
^~~
with a range that covers the relevant expression, not just a range of length
zero pointing to the wrong place.