FreeBSD/contrib/gcc/cp/class.c
/* FIELD is a bit-field.  We are finishing the processing for its
   enclosing type.  Issue any appropriate messages and set appropriate
   flags.  */
FIELD is a bit-field.  We are finishing the processing for its
enclosing type.  Issue any appropriate messages and set appropriate
flags.
FIELD is a bit - field . We are finishing the processing for its enclosing type . Issue any appropriate messages and set appropriate flags .
static void
check_bitfield_decl (tree field)
{
  tree type = TREE_TYPE (field);
  tree w;
  w = DECL_INITIAL (field);
  gcc_assert (w != NULL_TREE);
  DECL_INITIAL (field) = NULL_TREE;
  if (!INTEGRAL_TYPE_P (type))
    {
      error ("bit-field %q+#D with non-integral type", field);
      TREE_TYPE (field) = error_mark_node;
      w = error_mark_node;
    }
  else
    {
      STRIP_NOPS (w);
      w = integral_constant_value (w);
      if (TREE_CODE (w) != INTEGER_CST)
	{
	  error ("bit-field %q+D width not an integer constant", field);
	  w = error_mark_node;
	}
      else if (tree_int_cst_sgn (w) < 0)
	{
	  error ("negative width in bit-field %q+D", field);
	  w = error_mark_node;
	}
      else if (integer_zerop (w) && DECL_NAME (field) != 0)
	{
	  error ("zero width for bit-field %q+D", field);
	  w = error_mark_node;
	}
      else if (compare_tree_int (w, TYPE_PRECISION (type)) > 0
	       && TREE_CODE (type) != ENUMERAL_TYPE
	       && TREE_CODE (type) != BOOLEAN_TYPE)
	warning (0, "width of %q+D exceeds its type", field);
      else if (TREE_CODE (type) == ENUMERAL_TYPE
	       && (0 > compare_tree_int (w,
					 min_precision (TYPE_MIN_VALUE (type),
							TYPE_UNSIGNED (type)))
		   ||  0 > compare_tree_int (w,
					     min_precision
					     (TYPE_MAX_VALUE (type),
					      TYPE_UNSIGNED (type)))))
	warning (0, "%q+D is too small to hold all values of %q#T", field, type);
    }
  if (w != error_mark_node)
    {
      DECL_SIZE (field) = convert (bitsizetype, w);
      DECL_BIT_FIELD (field) = 1;
    }
  else
    {
      DECL_BIT_FIELD (field) = 0;
      CLEAR_DECL_C_BIT_FIELD (field);
    }
}
static void check_bitfield_decl ( tree field ) { tree type = TREE_TYPE ( field ) ; tree w ; w = DECL_INITIAL ( field ) ; gcc_assert ( w != NULL_TREE ) ; DECL_INITIAL ( field ) = NULL_TREE ; if ( ! INTEGRAL_TYPE_P ( type ) ) { error ( " " , field ) ; TREE_TYPE ( field ) = error_mark_node ; w = error_mark_node ; } else { STRIP_NOPS ( w ) ; w = integral_constant_value ( w ) ; if ( TREE_CODE ( w ) != INTEGER_CST ) { error ( " " , field ) ; w = error_mark_node ; } else if ( tree_int_cst_sgn ( w ) < 0 ) { error ( " " , field ) ; w = error_mark_node ; } else if ( integer_zerop ( w ) && DECL_NAME ( field ) != 0 ) { error ( " " , field ) ; w = error_mark_node ; } else if ( compare_tree_int ( w , TYPE_PRECISION ( type ) ) > 0 && TREE_CODE ( type ) != ENUMERAL_TYPE && TREE_CODE ( type ) != BOOLEAN_TYPE ) warning ( 0 , " " , field ) ; else if ( TREE_CODE ( type ) == ENUMERAL_TYPE && ( 0 > compare_tree_int ( w , min_precision ( TYPE_MIN_VALUE ( type ) , TYPE_UNSIGNED ( type ) ) ) || 0 > compare_tree_int ( w , min_precision ( TYPE_MAX_VALUE ( type ) , TYPE_UNSIGNED ( type ) ) ) ) ) warning ( 0 , " " , field , type ) ; } if ( w != error_mark_node ) { DECL_SIZE ( field ) = convert ( bitsizetype , w ) ; DECL_BIT_FIELD ( field ) = 1 ; } else { DECL_BIT_FIELD ( field ) = 0 ; CLEAR_DECL_C_BIT_FIELD ( field ) ; } }
FIELD is a bit-field.
FIELD is a bit - field .
/* Extract the declared width of the bitfield, which has been
     temporarily stashed in DECL_INITIAL.  */ /* Remove the bit-field width indicator so that the rest of the
     compiler does not treat that value as an initializer.  */ /* Detect invalid bit-field type.  */ /* Avoid the non_lvalue wrapper added by fold for PLUS_EXPRs.  */ /* detect invalid field size.  */ /* Non-bit-fields are aligned for their type.  */