aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-08-18 21:13:10 +0000
committerRichard Stallman <rms@gnu.org>1992-08-18 21:13:10 +0000
commit7e70e7c5a6f10e856effe52c1b6e1e67d2759340 (patch)
tree1740284f97c312a8ca7f44e32047cb3b116ed850 /gcc
parentceedd25ef0cdca80e585b0d542cbe45e754c0efd (diff)
downloadgcc-7e70e7c5a6f10e856effe52c1b6e1e67d2759340.zip
gcc-7e70e7c5a6f10e856effe52c1b6e1e67d2759340.tar.gz
gcc-7e70e7c5a6f10e856effe52c1b6e1e67d2759340.tar.bz2
(expand_return): Call emit_queue in ignore-the-value case.
(expand_end_bindings): Check DECL_IN_SYSTEM_HEADER for unused warnings. From-SVN: r1889
Diffstat (limited to 'gcc')
-rw-r--r--gcc/stmt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index eb24d39..71f15dd 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -2185,6 +2185,7 @@ expand_return (retval)
if (TREE_CODE (TREE_TYPE (TREE_TYPE (current_function_decl))) == VOID_TYPE)
{
expand_expr (retval, NULL_RTX, VOIDmode, 0);
+ emit_queue ();
expand_null_return ();
return;
}
@@ -2476,7 +2477,8 @@ expand_end_bindings (vars, mark_ends, dont_jump_in)
if (warn_unused)
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'");
/* Mark the beginning and end of the scope if requested. */