FreeBSD/contrib/gcc/c-common.c
/* APPLE LOCAL begin radar 6246527 */
/* This routine is called for a "format" attribute. It adds the number of
 hidden argument ('1') to the format's 2nd and 3rd argument to compensate
 for these two arguments. This is to make rest of the "format" attribute
 processing done in the middle-end to work seemlessly. */
APPLE LOCAL begin radar 6246527
This routine is called for a "format" attribute. It adds the number of
hidden argument ('1') to the format's 2nd and 3rd argument to compensate
for these two arguments. This is to make rest of the "format" attribute
processing done in the middle-end to work seemlessly.
APPLE LOCAL begin radar 6246527 This routine is called for a " format " attribute . It adds the number of hidden argument ( ' 1 ' ) to the format ' s 2nd and 3rd argument to compensate for these two arguments . This is to make rest of the " format " attribute processing done in the middle - end to work seemlessly .
static void
block_delta_format_args (tree format)
{
  tree format_num_expr, first_arg_num_expr;
  int val; 
  tree args = TREE_VALUE (format);
  gcc_assert (TREE_CHAIN (args) && TREE_CHAIN (TREE_CHAIN (args)));
  format_num_expr = TREE_VALUE (TREE_CHAIN (args));
  first_arg_num_expr = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (args)));
  if (format_num_expr && TREE_CODE (format_num_expr) == INTEGER_CST)
  {
      val = TREE_INT_CST_LOW (format_num_expr);
      TREE_VALUE (TREE_CHAIN (args)) = build_int_cst (NULL_TREE, val+1);
  }
  if (first_arg_num_expr && TREE_CODE (first_arg_num_expr) == INTEGER_CST)
  {
      val = TREE_INT_CST_LOW (first_arg_num_expr);
      if (val != 0)
	TREE_VALUE (TREE_CHAIN (TREE_CHAIN (args))) = 
	build_int_cst (NULL_TREE, val+1);
  }
}
static void block_delta_format_args ( tree format ) { tree format_num_expr , first_arg_num_expr ; int val ; tree args = TREE_VALUE ( format ) ; gcc_assert ( TREE_CHAIN ( args ) && TREE_CHAIN ( TREE_CHAIN ( args ) ) ) ; format_num_expr = TREE_VALUE ( TREE_CHAIN ( args ) ) ; first_arg_num_expr = TREE_VALUE ( TREE_CHAIN ( TREE_CHAIN ( args ) ) ) ; if ( format_num_expr && TREE_CODE ( format_num_expr ) == INTEGER_CST ) { val = TREE_INT_CST_LOW ( format_num_expr ) ; TREE_VALUE ( TREE_CHAIN ( args ) ) = build_int_cst ( NULL_TREE , val + 1 ) ; } if ( first_arg_num_expr && TREE_CODE ( first_arg_num_expr ) == INTEGER_CST ) { val = TREE_INT_CST_LOW ( first_arg_num_expr ) ; if ( val != 0 ) TREE_VALUE ( TREE_CHAIN ( TREE_CHAIN ( args ) ) ) = build_int_cst ( NULL_TREE , val + 1 ) ; } }
APPLE LOCAL begin radar 6246527
This routine is called for a "format" attribute.
APPLE LOCAL begin radar 6246527 This routine is called for a " format " attribute .