aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/typeck.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/cp/typeck.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/cp/typeck.c')
-rw-r--r--gcc/cp/typeck.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 671a666..45c14453 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -5058,13 +5058,13 @@ build_x_compound_expr (list)
/* the left-hand operand of a comma expression is like an expression
statement: we should warn if it doesn't have any side-effects,
unless it was explicitly cast to (void). */
- if ((extra_warnings || warn_unused)
+ if ((extra_warnings || warn_unused_value)
&& !(TREE_CODE (TREE_VALUE(list)) == CONVERT_EXPR
&& TREE_TYPE (TREE_VALUE(list)) == void_type_node))
warning("left-hand operand of comma expression has no effect");
}
#if 0 /* this requires a gcc backend patch to export warn_if_unused_value */
- else if (warn_unused)
+ else if (warn_unused_value)
warn_if_unused_value (TREE_VALUE(list));
#endif