aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@redhat.com>2012-04-30 11:43:57 +0000
committerDodji Seketeli <dodji@gcc.gnu.org>2012-04-30 13:43:57 +0200
commitb9c8da345cd0763bb30a5a12713c808d74a2070f (patch)
treee79bab429f035c8a49182501433c80c03c767993 /gcc/doc
parent51fce2d3968d485cc72fb22740e82d0c31ce9ae9 (diff)
downloadgcc-b9c8da345cd0763bb30a5a12713c808d74a2070f.zip
gcc-b9c8da345cd0763bb30a5a12713c808d74a2070f.tar.gz
gcc-b9c8da345cd0763bb30a5a12713c808d74a2070f.tar.bz2
Add -Wvarargs option
Several warnings related to questionable usage cases of variadic function related macros (like va_start) could not be controlled by any warning-related macro. Fixed thus, by introducing the -Wvarargs option. Tested on x86_64-unknown-linux-gnu against trunk. gcc/c-family/ * c.opt (Wvarargs): Define new option. gcc/ * builtins.c (fold_builtin_next_arg): Use OPT_Wvarargs as an argument for the various warning_at calls. gcc/doc/ * invoke.texi: Update the documentation. gcc/testsuite/ * c-c++-common/Wvarargs.c: New test case. * c-c++-common/Wvarargs-2.c: Likewise. From-SVN: r186978
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index c6ee28f..a7efaa7 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -4663,6 +4663,13 @@ Warn if variadic macros are used in pedantic ISO C90 mode, or the GNU
alternate syntax when in pedantic ISO C99 mode. This is default.
To inhibit the warning messages, use @option{-Wno-variadic-macros}.
+@item -Wvarargs
+@opindex Wvarargs
+@opindex Wno-varargs
+Warn upon questionable usage of the macros used to handle variable
+arguments like @samp{va_start}. This is default. To inhibit the
+warning messages, use @option{-Wno-varargs}.
+
@item -Wvector-operation-performance
@opindex Wvector-operation-performance
@opindex Wno-vector-operation-performance