Hi,
Yes, please. It feels as if the names are based more on the underlying
implementation of the macro than on anything else. Also, short names
are nice, but using MEM instead of MEMBER is a bit too short. The same
for OB for object and others.

PTR_OR_PTRMEM sounds to me like "pointer or pointer to member", which
sounds redundant since a pointer to member is a pointer already.

And there is also TYPE_PTRMEM_P and TYPE_PTR_TO_MEMBER_P. From the
names it is not clear what is the difference. This could be
TYPE_PTR_TO_DATA_MEMBER and TYPE_PTR_TO_ANY_MEMBER. The few extra
chars help a lot to clarify the meaning.
Let's see if we can do something *now* ;) My concrete proposal would be:

TYPE_PTRMEM_P rename to TYPE_PTRDATAMEM_P (consistent with TYPE_PTRMEMFUNC_P)
TYPE_PTR_TO_MEMBER_P rename to TYPE_PTRMEM_P

and then finally

#define TYPE_PTR_OR_PTRMEM_P(NODE) \
    (TYPE_PTR_P (NODE) || TYPE_PTRMEM_P (NODE))

and use it everywhere. Sounds like an improvement?

Additionally, we could maybe rename PTRMEM_OK_P to PTRMEMFUNC_OK_P

Thanks,
Paolo.

Reply via email to