Commit 6692a31f by Richard Kenner

(expand_builtin, case BUILT_IN_NEXT_ARG): Strip off INDIRECT_REF when

checking second arg.

From-SVN: r11139
parent 3c758d82
...@@ -8047,10 +8047,13 @@ expand_builtin (exp, target, subtarget, mode, ignore) ...@@ -8047,10 +8047,13 @@ expand_builtin (exp, target, subtarget, mode, ignore)
tree arg = TREE_VALUE (arglist); tree arg = TREE_VALUE (arglist);
/* Strip off all nops for the sake of the comparison. This /* Strip off all nops for the sake of the comparison. This
is not quite the same as STRIP_NOPS. It does more. */ is not quite the same as STRIP_NOPS. It does more.
We must also strip off INDIRECT_EXPR for C++ reference
parameters. */
while (TREE_CODE (arg) == NOP_EXPR while (TREE_CODE (arg) == NOP_EXPR
|| TREE_CODE (arg) == CONVERT_EXPR || TREE_CODE (arg) == CONVERT_EXPR
|| TREE_CODE (arg) == NON_LVALUE_EXPR) || TREE_CODE (arg) == NON_LVALUE_EXPR
|| TREE_CODE (arg) == INDIRECT_REF)
arg = TREE_OPERAND (arg, 0); arg = TREE_OPERAND (arg, 0);
if (arg != last_parm) if (arg != last_parm)
warning ("second parameter of `va_start' not last named argument"); warning ("second parameter of `va_start' not last named argument");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment