aboutsummaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@gcc.gnu.org>2000-05-17 08:15:29 +0000
committerAndrew Cagney <cagney@gcc.gnu.org>2000-05-17 08:15:29 +0000
commit078721e1a2e6f361f4c7ed6b9017b6fb0d7211a1 (patch)
tree2543ce057f160b4e63e78f64be913189cbabb8e5 /gcc/stmt.c
parentef94b7f541f59ed3d9f5953a86e026cb217615b6 (diff)
downloadgcc-078721e1a2e6f361f4c7ed6b9017b6fb0d7211a1.zip
gcc-078721e1a2e6f361f4c7ed6b9017b6fb0d7211a1.tar.gz
gcc-078721e1a2e6f361f4c7ed6b9017b6fb0d7211a1.tar.bz2
Add options -Wunused-variable, -Wunused-function, -Wunused-label,
-Wunused-parameter. Retain existing -Wunused behavour. Document. From-SVN: r33953
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 0626e2c..a3b72ea 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -1857,12 +1857,13 @@ expand_expr_stmt (exp)
except inside a ({...}) where they may be useful. */
if (expr_stmts_for_value == 0 && exp != error_mark_node)
{
- if (! TREE_SIDE_EFFECTS (exp) && (extra_warnings || warn_unused)
+ if (! TREE_SIDE_EFFECTS (exp)
+ && (extra_warnings || warn_unused_value)
&& !(TREE_CODE (exp) == CONVERT_EXPR
&& TREE_TYPE (exp) == void_type_node))
warning_with_file_and_line (emit_filename, emit_lineno,
"statement with no effect");
- else if (warn_unused)
+ else if (warn_unused_value)
warn_if_unused_value (exp);
}
@@ -3575,7 +3576,7 @@ warn_about_unused_variables (vars)
{
tree decl;
- if (warn_unused)
+ if (warn_unused_variable)
for (decl = vars; decl; decl = TREE_CHAIN (decl))
if (TREE_CODE (decl) == VAR_DECL
&& ! TREE_USED (decl)