This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77711] Add fix-it hints for missing parentheses in member function call
- 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 19:52:41 +0000
- Subject: [Bug c++/77711] Add fix-it hints for missing parentheses in member function call
- Auto-submitted: auto-generated
- References: <bug-77711-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77711
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
For comparison, clang gives a much clearer error:
77711.cc:11:9: error: reference to non-static member function must be called;
did you mean to call it with no arguments?
x.f
~~^
()
It says *why* it's invalid (it must be called), and suggests adding an empty
argument list (including when the function has parameters but they have default
arguments).
I have a fix for PR77777 so we can print the same range info and fix-it as
clang does.