FreeBSD/contrib/gcc/cp/class.c
/* Warn about duplicate methods in fn_fields.

   Sort methods that are not special (i.e., constructors, destructors,
   and type conversion operators) so that we can find them faster in
   search.  */
Warn about duplicate methods in fn_fields.
Sort methods that are not special  so that we can find them faster in
search.
Warn about duplicate methods in fn_fields . Sort methods that are not special so that we can find them faster in search .
static void
finish_struct_methods (tree t)
{
  tree fn_fields;
  VEC(tree,gc) *method_vec;
  int slot, len;
  method_vec = CLASSTYPE_METHOD_VEC (t);
  if (!method_vec)
    return;
  len = VEC_length (tree, method_vec);
  for (fn_fields = TYPE_METHODS (t); fn_fields;
       fn_fields = TREE_CHAIN (fn_fields))
    DECL_IN_AGGR_P (fn_fields) = 0;
  maybe_warn_about_overly_private_class (t);
  for (slot = CLASSTYPE_FIRST_CONVERSION_SLOT;
       VEC_iterate (tree, method_vec, slot, fn_fields);
       ++slot)
    if (!DECL_CONV_FN_P (OVL_CURRENT (fn_fields)))
      break;
  if (len - slot > 1)
    qsort (VEC_address (tree, method_vec) + slot,
	   len-slot, sizeof (tree), method_name_cmp);
}
static void finish_struct_methods ( tree t ) { tree fn_fields ; VEC ( tree , gc ) * method_vec ; int slot , len ; method_vec = CLASSTYPE_METHOD_VEC ( t ) ; if ( ! method_vec ) return ; len = VEC_length ( tree , method_vec ) ; for ( fn_fields = TYPE_METHODS ( t ) ; fn_fields ; fn_fields = TREE_CHAIN ( fn_fields ) ) DECL_IN_AGGR_P ( fn_fields ) = 0 ; maybe_warn_about_overly_private_class ( t ) ; for ( slot = CLASSTYPE_FIRST_CONVERSION_SLOT ; VEC_iterate ( tree , method_vec , slot , fn_fields ) ; ++ slot ) if ( ! DECL_CONV_FN_P ( OVL_CURRENT ( fn_fields ) ) ) break ; if ( len - slot > 1 ) qsort ( VEC_address ( tree , method_vec ) + slot , len - slot , sizeof ( tree ) , method_name_cmp ) ; }
Warn about duplicate methods in fn_fields.
Warn about duplicate methods in fn_fields .
/* Clear DECL_IN_AGGR_P for all functions.  */ /* Issue warnings about private constructors and such.  If there are
     no methods, then some public defaults are generated.  */ /* The type conversion ops have to live at the front of the vec, so we
     can't sort them.  */