contrib/gcc-5.0/gcc/cp/class.c
/* This routine compares two fields like method_name_cmp but using the
   pointer operator in resort_field_decl_data.  */
This routine compares two fields like method_name_cmp but using the
pointer operator in resort_field_decl_data.
This routine compares two fields like method_name_cmp but using the pointer operator in resort_field_decl_data .
static int
resort_method_name_cmp (const void* m1_p, const void* m2_p)
{
  const tree *const m1 = (const tree *) m1_p;
  const tree *const m2 = (const tree *) m2_p;
  if (*m1 == NULL_TREE && *m2 == NULL_TREE)
    return 0;
  if (*m1 == NULL_TREE)
    return -1;
  if (*m2 == NULL_TREE)
    return 1;
  {
    tree d1 = DECL_NAME (OVL_CURRENT (*m1));
    tree d2 = DECL_NAME (OVL_CURRENT (*m2));
    resort_data.new_value (&d1, resort_data.cookie);
    resort_data.new_value (&d2, resort_data.cookie);
    if (d1 < d2)
      return -1;
  }
  return 1;
}
static int resort_method_name_cmp ( const void * m1_p , const void * m2_p ) { const tree * const m1 = ( const tree * ) m1_p ; const tree * const m2 = ( const tree * ) m2_p ; if ( * m1 == NULL_TREE && * m2 == NULL_TREE ) return 0 ; if ( * m1 == NULL_TREE ) return -1 ; if ( * m2 == NULL_TREE ) return 1 ; { tree d1 = DECL_NAME ( OVL_CURRENT ( * m1 ) ) ; tree d2 = DECL_NAME ( OVL_CURRENT ( * m2 ) ) ; resort_data . new_value ( & d1 , resort_data . cookie ) ; resort_data . new_value ( & d2 , resort_data . cookie ) ; if ( d1 < d2 ) return -1 ; } return 1 ; }
This routine compares two fields like method_name_cmp but using the
pointer operator in resort_field_decl_data.
This routine compares two fields like method_name_cmp but using the pointer operator in resort_field_decl_data .