https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77711
Jonathan Wakely changed:
What|Removed |Added
Assignee|redi at gcc dot gnu.org|unassigned at gcc dot
gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77711
Jonathan Wakely changed:
What|Removed |Added
Target Milestone|10.2|11.0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77711
Jakub Jelinek changed:
What|Removed |Added
Target Milestone|10.0|10.2
--- Comment #11 from Jakub Jelinek
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77711
Jonathan Wakely changed:
What|Removed |Added
Target Milestone|9.3 |10.0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77711
Jakub Jelinek changed:
What|Removed |Added
Target Milestone|9.2 |9.3
--- Comment #10 from Jakub Jelinek
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77711
Jakub Jelinek changed:
What|Removed |Added
Target Milestone|9.0 |9.2
--- Comment #9 from Jakub Jelinek -
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77711
--- Comment #8 from Jonathan Wakely ---
My patch doesn't help for comment 2 because we never call
invalid_nonstatic_member_fn when the nonsense expression refers to the name of
an overloaded member function. Instead we perform overload resolution
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77711
Jonathan Wakely changed:
What|Removed |Added
Status|NEW |ASSIGNED
Assignee|dmalcolm a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77711
David Malcolm changed:
What|Removed |Added
CC||dmalcolm at gcc dot gnu.org
As
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77711
--- Comment #6 from Jonathan Wakely ---
Yet another variation on missing argument list for a member function call:
call.cc: In function ‘int main()’:
call.cc:20:14: error: cannot convert ‘A::foo’ from type ‘int (A::)()’ to type
‘int (A::*)()’
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77711
--- Comment #5 from Jonathan Wakely ---
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
~~^
()
I
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77711
--- Comment #4 from Jonathan Wakely ---
Ideally we'd look to see if a.foo() would return a type that would make the
call bar( a.foo() ) valid, and not suggest it otherwise (there's no point
suggesting it if a.foo() returns void, for example).
An
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77711
--- Comment #3 from Jonathan Wakely ---
With:
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -1823,6 +1823,7 @@ invalid_nonstatic_memfn_p (location_t loc, tree expr,
tsubst_flags_t complain)
/* Don't enforce this in MS mode. */
if (flag_m
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77711
--- Comment #2 from Jonathan Wakely ---
And then if the function we're calling is a member function we get another
variation:
struct A {
int foo();
int foo() const;
void bar(int);
};
int main()
{
A a;
a.bar( a.foo );
}
foo.cc: In fu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77711
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
15 matches
Mail list logo