https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96518
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- This is already fixed for GCC 11: diag.C: In function 'int main(int, char**)': diag.C:39:17: error: 'class Foo' has no member named 'getParent'; did you mean 'GetParent'? 39 | Foo *f3 = f.getParent(); | ^~~~~~~~~ | GetParent