FreeBSD/contrib/gcc/cp/decl.c
/* Subroutine of reshape_init_array and reshape_init_vector, which does
   the actual work. ELT_TYPE is the element type of the array. MAX_INDEX is an
   INTEGER_CST representing the size of the array minus one (the maximum index),
   or NULL_TREE if the array was declared without specifying the size. D is
   the iterator within the constructor.  */
Subroutine of reshape_init_array and reshape_init_vector, which does
the actual work. ELT_TYPE is the element type of the array. MAX_INDEX is an
INTEGER_CST representing the size of the array minus one (the maximum index),
or NULL_TREE if the array was declared without specifying the size. D is
the iterator within the constructor.
Subroutine of reshape_init_array and reshape_init_vector which does the actual work . ELT_TYPE is the element type of the array . MAX_INDEX is an INTEGER_CST representing the size of the array minus one ( the maximum index ) or NULL_TREE if the array was declared without specifying the size . D is the iterator within the constructor .
static tree
reshape_init_array_1 (tree elt_type, tree max_index, reshape_iter *d)
{
  tree new_init;
  bool sized_array_p = (max_index != NULL_TREE);
  unsigned HOST_WIDE_INT max_index_cst = 0;
  unsigned HOST_WIDE_INT index;
  new_init = build_constructor (NULL_TREE, NULL);
  if (sized_array_p)
    {
      if (integer_all_onesp (max_index))
	return new_init;
      if (host_integerp (max_index, 1))
	max_index_cst = tree_low_cst (max_index, 1);
      else
	max_index_cst = tree_low_cst (fold_convert (size_type_node, max_index),
				      1);
    }
  for (index = 0;
       d->cur != d->end && (!sized_array_p || index <= max_index_cst);
       ++index)
    {
      tree elt_init;
      check_array_designated_initializer (d->cur);
      elt_init = reshape_init_r (elt_type, d, false);
      if (elt_init == error_mark_node)
	return error_mark_node;
      CONSTRUCTOR_APPEND_ELT (CONSTRUCTOR_ELTS (new_init), NULL_TREE, elt_init);
    }
  return new_init;
}
static tree reshape_init_array_1 ( tree elt_type , tree max_index , reshape_iter * d ) { tree new_init ; bool sized_array_p = ( max_index != NULL_TREE ) ; unsigned HOST_WIDE_INT max_index_cst = 0 ; unsigned HOST_WIDE_INT index ; new_init = build_constructor ( NULL_TREE , NULL ) ; if ( sized_array_p ) { if ( integer_all_onesp ( max_index ) ) return new_init ; if ( host_integerp ( max_index , 1 ) ) max_index_cst = tree_low_cst ( max_index , 1 ) ; else max_index_cst = tree_low_cst ( fold_convert ( size_type_node , max_index ) , 1 ) ; } for ( index = 0 ; d -> cur != d -> end && ( ! sized_array_p || index <= max_index_cst ) ; ++ index ) { tree elt_init ; check_array_designated_initializer ( d -> cur ) ; elt_init = reshape_init_r ( elt_type , d , false ) ; if ( elt_init == error_mark_node ) return error_mark_node ; CONSTRUCTOR_APPEND_ELT ( CONSTRUCTOR_ELTS ( new_init ) , NULL_TREE , elt_init ) ; } return new_init ; }
Subroutine of reshape_init_array and reshape_init_vector, which does
the actual work.
Subroutine of reshape_init_array and reshape_init_vector which does the actual work .
/* The initializer for an array is always a CONSTRUCTOR.  */ /* Minus 1 is used for zero sized arrays.  */ /* sizetype is sign extended, not zero extended.  */ /* Loop until there are no more initializers.  */ /*first_initializer_p=*/