This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Need help understanding decl_handle_format_arg_attribute
- To: gcc at gcc dot gnu dot org
- Subject: Need help understanding decl_handle_format_arg_attribute
- From: Philipp Thomas <pthomas at suse dot de>
- Date: Thu, 9 Aug 2001 13:33:58 +0200
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