diff options
author | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-10 07:27:32 +0000 |
---|---|---|
committer | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-10 07:27:32 +0000 |
commit | af5f5e793d0f7301e5e864931a9c91fb9736387f (patch) | |
tree | cf4b509067e40cd7e3e96f721aebe6f76de83ac9 /gcc/c.opt | |
parent | 7c88e5139429d67cee9024435cad0d95b7d42307 (diff) | |
download | gcc-af5f5e793d0f7301e5e864931a9c91fb9736387f.tar.gz |
2009-07-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR 25509
PR 40614
* c.opt (Wunused-result): New.
* doc/invoke.texi: Document it.
* c-common.c (c_warn_unused_result): Use it.
testsuite/
* g++.dg/warn/unused-result1-Werror.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149458 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c.opt')
-rw-r--r-- | gcc/c.opt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c.opt b/gcc/c.opt index e8a9a31a382..5ee9a1348d4 100644 --- a/gcc/c.opt +++ b/gcc/c.opt @@ -488,6 +488,10 @@ Wunused-macros C ObjC C++ ObjC++ Warning Warn about macros defined in the main file that are not used +Wunused-result +C ObjC C++ ObjC++ Var(warn_unused_result) Init(1) Warning +Warn if a caller of a function, marked with attribute warn_unused_result, does not use its return value + Wvariadic-macros C ObjC C++ ObjC++ Warning Do not warn about using variadic macros when -pedantic |