This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]