diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2007-02-12 09:32:08 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2007-02-12 09:32:08 +0000 |
commit | 27f33b1531f5e59660355565e056a6630eafd762 (patch) | |
tree | f1b274125c0152bf665584f0c63ddbf388817016 /gcc/doc | |
parent | ed41063ab48a701f02fb4389f538d4264b9fc868 (diff) | |
download | gcc-27f33b1531f5e59660355565e056a6630eafd762.zip gcc-27f33b1531f5e59660355565e056a6630eafd762.tar.gz gcc-27f33b1531f5e59660355565e056a6630eafd762.tar.bz2 |
re PR middle-end/7651 (Define -Wextra strictly in terms of other warning flags)
2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR middle-end/7651
* doc/invoke.texi (Wunused-value): Update description.
(Wextra): Delete item.
* opts.c (set_Wextra): Don't use the value of Wextra to set the
value of Wunused-value.
* c-typeck.c (c_process_expr_stmt): Don't check extra_warnings.
(c_finish_stmt_expr): Don't check extra_warnings.
(emit_side_effect_warnings): The caller is responsible to check
warn_unused_value.
cp/
* cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
Check warn_unused_value just once.
From-SVN: r121843
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index ad5b31d..b435781 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -2730,10 +2730,14 @@ To suppress this warning use the @samp{unused} attribute @item -Wunused-value @opindex Wunused-value -Warn whenever a statement computes a result that is explicitly not used. -This warning is enabled by @option{-Wall}. +Warn whenever a statement computes a result that is explicitly not +used. To suppress this warning cast the unused expression to +@samp{void}. This includes an expression-statement or the left-hand +side of a comma expression that contains no side effects. For example, +an expression such as @samp{x[i,j]} will cause a warning, while +@samp{x[(void)i,j]} will not. -To suppress this warning cast the expression to @samp{void}. +This warning is enabled by @option{-Wall}. @item -Wunused @opindex Wunused @@ -2909,13 +2913,6 @@ foo (a) @end smallexample @item -An expression-statement or the left-hand side of a comma expression -contains no side effects. -To suppress the warning, cast the unused expression to void. -For example, an expression such as @samp{x[i,j]} will cause a warning, -but @samp{x[(void)i,j]} will not. - -@item An unsigned value is compared against zero with @samp{<} or @samp{>=}. @item @r{(C only)} |