This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Need help understanding decl_handle_format_arg_attribute


While trying to translate gcc messages, I stumbled over a message in
format.c(decl_handle_format_arg_attribute), that I can't make sense of.
Therefore I'd like some help from someone understanding that code.

d_h_f_a_a has at the top this code:

  /* Strip any conversions from the first arg number and verify it
     is a constant.  */
  while (TREE_CODE (format_num_expr) == NOP_EXPR
     || TREE_CODE (format_num_expr) == CONVERT_EXPR
     || TREE_CODE (format_num_expr) == NON_LVALUE_EXPR)
    format_num_expr = TREE_OPERAND (format_num_expr, 0);
 
  if (TREE_CODE (format_num_expr) != INTEGER_CST
      || TREE_INT_CST_HIGH (format_num_expr) != 0)
    {
      error ("format string has invalid operand number");
      return;
    }


Now could anyone enlighten me what this error message means? Specifically
what 'operand number' refers to?

Philipp


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]