Commit 497dc802 by Jason Merrill

(expand_function_end): Don't warn about unused

        anonymous or artificial parms.

From-SVN: r9585
parent 8d75e509
...@@ -5241,7 +5241,8 @@ expand_function_end (filename, line, end_bindings) ...@@ -5241,7 +5241,8 @@ expand_function_end (filename, line, end_bindings)
for (decl = DECL_ARGUMENTS (current_function_decl); for (decl = DECL_ARGUMENTS (current_function_decl);
decl; decl = TREE_CHAIN (decl)) decl; decl = TREE_CHAIN (decl))
if (! TREE_USED (decl) && TREE_CODE (decl) == PARM_DECL) if (! TREE_USED (decl) && TREE_CODE (decl) == PARM_DECL
&& DECL_NAME (decl) && ! DECL_ARTIFICIAL (decl))
warning_with_decl (decl, "unused parameter `%s'"); warning_with_decl (decl, "unused parameter `%s'");
} }
......
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