* doc/invoke.texi: Add -Wvariadic-macros.

From-SVN: r78179
This commit is contained in:
Richard Henderson 2004-02-20 10:42:51 -08:00 committed by Richard Henderson
parent 821b56cbd6
commit 7c4d376d4f
6 changed files with 37 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2004-02-20 Richard Henderson <rth@redhat.com>
* doc/invoke.texi: Add -Wvariadic-macros.
2004-02-20 Kazu Hirata <kazu@cs.umass.edu>
* haifa-sched.c (sched_emit_insn): Remove.

View File

@ -232,7 +232,8 @@ in the following sections.
-Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized @gol
-Wunknown-pragmas -Wunreachable-code @gol
-Wunused -Wunused-function -Wunused-label -Wunused-parameter @gol
-Wunused-value -Wunused-variable -Wwrite-strings}
-Wunused-value -Wunused-variable -Wwrite-strings @gol
-Wvariadic-macros}
@item C-only Warning Options
@gccoptlist{-Wbad-function-cast -Wmissing-declarations @gol
@ -2963,6 +2964,13 @@ the warning messages, use @option{-Wno-long-long}. Flags
@option{-Wlong-long} and @option{-Wno-long-long} are taken into account
only when @option{-pedantic} flag is used.
@item -Wvariadic-macros
@opindex Wvariadic-macros
@opindex Wno-variadic-macros
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 -Wdisabled-optimization
@opindex Wdisabled-optimization
Warn if a requested optimization pass is disabled. This warning does

View File

@ -0,0 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-std=iso9899:1990 -pedantic -Werror" } */
#define f(x,...) /* { dg-error "variadic" } */
#define g(x,y...) /* { dg-error "variadic" } */
int not_empty;

View File

@ -0,0 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-std=iso9899:1990 -pedantic -Werror -Wno-variadic-macros" } */
#define f(x,...) /* { dg-bogus "variadic" } */
#define g(x,y...) /* { dg-bogus "variadic" } */
int not_empty;

View File

@ -0,0 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-std=iso9899:1999 -pedantic -Werror" } */
#define f(x,...)
#define g(x,y...) /* { dg-error "variadic" } */
int not_empty;

View File

@ -0,0 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-std=iso9899:1999 -pedantic -Werror -Wno-variadic-macros" } */
#define f(x,...)
#define g(x,y...)
int not_empty;