.. I analyzed a bit what is happening and this is what I see: the only
interesting case is that of C++, where pointer_int_sum is called via
cp_pointer_int_sum. The latter is only called by cp_build_binary_op but
that happens for MINUS_EXPR and PLUS_EXPR as operator. In such cases
however, only operands with POINTER_TYPE as TREE_TYPE are passed to
cp_pointer_int_sum. AFAICS this never happens for actual pointers to
(non-static) member function, eg, for:
struct A { void f(); };
auto p = &A::f + 1;
the TREE_TYPE of the first operand is RECORD_TYPE (the TREE_CODE is
PTRMEM_CST).
On the other hand, for static member functions the representation uses
as TREE_TYPE a POINTER_TYPE to FUNCTION_TYPE, which is correctly handled
by pointer_int_sum.
Paolo.