On 05/10/2012 05:31 PM, Paolo Carlini wrote:
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?

Sounds pretty good. But I suspect a lot of places want to check TYPE_PTR_P || TYPE_PTRDATAMEM_P (because you can't just use TREE_TYPE to get the function type of a PMF), so this new macro doesn't help with your desire to avoid writing ||.

Additionally, we could maybe rename PTRMEM_OK_P to PTRMEMFUNC_OK_P

No, that flag applies to both varieties of members.

Jason

Reply via email to