FreeBSD/contrib/gcc/cp/typeck.c
/* Return an expression for the MEMBER_NAME field in the internal
   representation of PTRMEM, a pointer-to-member function.  (Each
   pointer-to-member function type gets its own RECORD_TYPE so it is
   more convenient to access the fields by name than by FIELD_DECL.)
   This routine converts the NAME to a FIELD_DECL and then creates the
   node for the complete expression.  */
Return an expression for the MEMBER_NAME field in the internal
representation of PTRMEM, a pointer-to-member function.  (Each
pointer-to-member function type gets its own RECORD_TYPE so it is
more convenient to access the fields by name than by FIELD_DECL.)
This routine converts the NAME to a FIELD_DECL and then creates the
node for the complete expression.
Return an expression for the MEMBER_NAME field in the internal representation of PTRMEM a pointer - to - member function . ( Each pointer - to - member function type gets its own RECORD_TYPE so it is more convenient to access the fields by name than by FIELD_DECL . ) This routine converts the NAME to a FIELD_DECL and then creates the node for the complete expression .
tree
build_ptrmemfunc_access_expr (tree ptrmem, tree member_name)
{
  tree ptrmem_type;
  tree member;
  tree member_type;
  ptrmem_type = TREE_TYPE (ptrmem);
  gcc_assert (TYPE_PTRMEMFUNC_P (ptrmem_type));
  member = lookup_member (ptrmem_type, member_name, 0,
			  false);
  member_type = cp_build_qualified_type (TREE_TYPE (member),
					 cp_type_quals (ptrmem_type));
  return fold_build3 (COMPONENT_REF, member_type,
		      ptrmem, member, NULL_TREE);
}
tree build_ptrmemfunc_access_expr ( tree ptrmem , tree member_name ) { tree ptrmem_type ; tree member ; tree member_type ; ptrmem_type = TREE_TYPE ( ptrmem ) ; gcc_assert ( TYPE_PTRMEMFUNC_P ( ptrmem_type ) ) ; member = lookup_member ( ptrmem_type , member_name , 0 , false ) ; member_type = cp_build_qualified_type ( TREE_TYPE ( member ) , cp_type_quals ( ptrmem_type ) ) ; return fold_build3 ( COMPONENT_REF , member_type , ptrmem , member , NULL_TREE ) ; }
Return an expression for the MEMBER_NAME field in the internal
representation of PTRMEM, a pointer-to-member function.
Return an expression for the MEMBER_NAME field in the internal representation of PTRMEM a pointer - to - member function .
/* This code is a stripped down version of
     build_class_member_access_expr.  It does not work to use that
     routine directly because it expects the object to be of class
     type.  */ /*protect=*/ /*want_type=*/