FreeBSD/contrib/gcc/cp/class.c
/* When T was built up, the member declarations were added in reverse
   order.  Rearrange them to declaration order.  */
When T was built up, the member declarations were added in reverse
order.  Rearrange them to declaration order.
When T was built up the member declarations were added in reverse order . Rearrange them to declaration order .
void
unreverse_member_declarations (tree t)
{
  tree next;
  tree prev;
  tree x;
  TYPE_METHODS (t) = nreverse (TYPE_METHODS (t));
  CLASSTYPE_DECL_LIST (t) = nreverse (CLASSTYPE_DECL_LIST (t));
  prev = NULL_TREE;
  for (x = TYPE_FIELDS (t);
       x && TREE_CODE (x) != TYPE_DECL;
       x = next)
    {
      next = TREE_CHAIN (x);
      TREE_CHAIN (x) = prev;
      prev = x;
    }
  if (prev)
    {
      TREE_CHAIN (TYPE_FIELDS (t)) = x;
      if (prev)
	TYPE_FIELDS (t) = prev;
    }
}
void unreverse_member_declarations ( tree t ) { tree next ; tree prev ; tree x ; TYPE_METHODS ( t ) = nreverse ( TYPE_METHODS ( t ) ) ; CLASSTYPE_DECL_LIST ( t ) = nreverse ( CLASSTYPE_DECL_LIST ( t ) ) ; prev = NULL_TREE ; for ( x = TYPE_FIELDS ( t ) ; x && TREE_CODE ( x ) != TYPE_DECL ; x = next ) { next = TREE_CHAIN ( x ) ; TREE_CHAIN ( x ) = prev ; prev = x ; } if ( prev ) { TREE_CHAIN ( TYPE_FIELDS ( t ) ) = x ; if ( prev ) TYPE_FIELDS ( t ) = prev ; } }
When T was built up, the member declarations were added in reverse
order.
When T was built up the member declarations were added in reverse order .
/* The following lists are all in reverse order.  Put them in
     declaration order now.  */ /* Actually, for the TYPE_FIELDS, only the non TYPE_DECLs are in
     reverse order, so we can't just use nreverse.  */