Commit 7e70e7c5 by Richard Stallman

(expand_return): Call emit_queue in ignore-the-value case.

(expand_end_bindings): Check DECL_IN_SYSTEM_HEADER for unused warnings.

From-SVN: r1889
parent ceedd25e
...@@ -2185,6 +2185,7 @@ expand_return (retval) ...@@ -2185,6 +2185,7 @@ expand_return (retval)
if (TREE_CODE (TREE_TYPE (TREE_TYPE (current_function_decl))) == VOID_TYPE) if (TREE_CODE (TREE_TYPE (TREE_TYPE (current_function_decl))) == VOID_TYPE)
{ {
expand_expr (retval, NULL_RTX, VOIDmode, 0); expand_expr (retval, NULL_RTX, VOIDmode, 0);
emit_queue ();
expand_null_return (); expand_null_return ();
return; return;
} }
...@@ -2476,7 +2477,8 @@ expand_end_bindings (vars, mark_ends, dont_jump_in) ...@@ -2476,7 +2477,8 @@ expand_end_bindings (vars, mark_ends, dont_jump_in)
if (warn_unused) if (warn_unused)
for (decl = vars; decl; decl = TREE_CHAIN (decl)) for (decl = vars; decl; decl = TREE_CHAIN (decl))
if (! TREE_USED (decl) && TREE_CODE (decl) == VAR_DECL) if (! TREE_USED (decl) && TREE_CODE (decl) == VAR_DECL
&& ! DECL_IN_SYSTEM_HEADER (decl))
warning_with_decl (decl, "unused variable `%s'"); warning_with_decl (decl, "unused variable `%s'");
/* Mark the beginning and end of the scope if requested. */ /* Mark the beginning and end of the scope if requested. */
......
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