https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115783
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>: https://gcc.gnu.org/g:2ee70c9f83a1033f2897a35bff9e9ffdd03cc651 commit r15-2159-g2ee70c9f83a1033f2897a35bff9e9ffdd03cc651 Author: Patrick Palka <ppa...@redhat.com> Date: Fri Jul 19 13:48:12 2024 -0400 c++: xobj fn call without obj [PR115783] The code path for rejecting an object-less call to a non-static member function should also consider xobj member functions (so that we correctly reject the below calls with a "cannot call member function without object" diagnostic). PR c++/115783 gcc/cp/ChangeLog: * call.cc (build_new_method_call): Generalize METHOD_TYPE check to DECL_OBJECT_MEMBER_FUNCTION_P. gcc/testsuite/ChangeLog: * g++.dg/cpp23/explicit-obj-diagnostics11.C: New test. Reviewed-by: Jason Merrill <ja...@redhat.com>