Commit 28786366 by Neil Booth Committed by Neil Booth

toplev.c (warn_dummy, W_options): Die.

	* toplev.c (warn_dummy, W_options): Die.
	(display_help): Don't print W_options.
	* common.opt: Add W_options help from toplev.c.

From-SVN: r69125
parent fbdb0453
2003-07-09 Neil Booth <neil@daikokuya.co.uk>
* toplev.c (warn_dummy, W_options): Die.
(display_help): Don't print W_options.
* common.opt: Add W_options help from toplev.c.
2003-07-09 Andreas Jaeger <aj@suse.de> 2003-07-09 Andreas Jaeger <aj@suse.de>
* opts.c (wrap_help): Only pass int arguments as arguments to * opts.c (wrap_help): Only pass int arguments as arguments to
......
...@@ -49,21 +49,27 @@ Optimize for space rather than speed ...@@ -49,21 +49,27 @@ Optimize for space rather than speed
W W
Common RejectNegative Common RejectNegative
This switch is deprecated; use -Wextra instead
Waggregate-return Waggregate-return
Common Common
Warn about returning structures, unions or arrays
Wcast-align Wcast-align
Common Common
Warn about pointer casts which increase alignment
Wdeprecated-declarations Wdeprecated-declarations
Common Common
Warn about uses of __attribute__((deprecated)) declarations
Wdisabled-optimization Wdisabled-optimization
Common Common
Warn when an optimization pass is disabled
Werror Werror
Common Common
Treat all warnings as errors
Wextra Wextra
Common Common
...@@ -71,6 +77,7 @@ Print extra (possibly unwanted) warnings ...@@ -71,6 +77,7 @@ Print extra (possibly unwanted) warnings
Winline Winline
Common Common
Warn when an inlined function cannot be inlined
Wlarger-than- Wlarger-than-
Common RejectNegative Joined UInteger Common RejectNegative Joined UInteger
...@@ -78,36 +85,47 @@ Common RejectNegative Joined UInteger ...@@ -78,36 +85,47 @@ Common RejectNegative Joined UInteger
Wmissing-noreturn Wmissing-noreturn
Common Common
Warn about functions which might be candidates for __attribute__((noreturn))
Wpacked Wpacked
Common Common
Warn when the packed attribute has no effect on struct layout
Wpadded Wpadded
Common Common
Warn when padding is required to align structure members
Wshadow Wshadow
Common Common
Warn when one local variable shadows another
Wstrict-aliasing Wstrict-aliasing
Common Common
Warn about code which might break strict aliasing rules
Wswitch Wswitch
Common Common
Warn about enumerated switches, with no default, missing a case
Wswitch-default Wswitch-default
Common Common
Warn about enumerated switches missing a \"default:\" statement
Wswitch-enum Wswitch-enum
Common Common
Warn about all enumerated switches missing a specific case
Wsystem-headers Wsystem-headers
Common Common
Suppress warnings from system headers
Wuninitialized Wuninitialized
Common Common
Warn about uninitialized automatic variables
Wunreachable-code Wunreachable-code
Common Common
Warn about code that will never be executed
Wunused Wunused
Common Common
...@@ -115,18 +133,23 @@ Enable all -Wunused- warnings ...@@ -115,18 +133,23 @@ Enable all -Wunused- warnings
Wunused-function Wunused-function
Common Common
Warn when a function is unused
Wunused-label Wunused-label
Common Common
Warn when a label is unused
Wunused-parameter Wunused-parameter
Common Common
Warn when a function parameter is unused
Wunused-value Wunused-value
Common Common
Warn when an expression value is unused
Wunused-variable Wunused-variable
Common Common
Warn when a variable is unused
aux-info aux-info
Common Separate Common Separate
......
...@@ -1503,66 +1503,11 @@ static const struct ...@@ -1503,66 +1503,11 @@ static const struct
target_options[] = TARGET_OPTIONS; target_options[] = TARGET_OPTIONS;
#endif #endif
/* Options controlling warnings. */
/* Nonzero means warn about function definitions that default the return type /* Nonzero means warn about function definitions that default the return type
or that use a null return and have a return-type other than void. */ or that use a null return and have a return-type other than void. */
int warn_return_type; int warn_return_type;
/* Used for the -W options array temporarily. */
static int warn_dummy;
/* Like f_options, but for -W. */
static const lang_independent_options W_options[] =
{
{"unused-function", &warn_dummy, 1,
N_("Warn when a function is unused") },
{"unused-label", &warn_dummy, 1,
N_("Warn when a label is unused") },
{"unused-parameter", &warn_dummy, 1,
N_("Warn when a function parameter is unused") },
{"unused-variable", &warn_dummy, 1,
N_("Warn when a variable is unused") },
{"unused-value", &warn_dummy, 1,
N_("Warn when an expression value is unused") },
{"system-headers", &warn_dummy, 1,
N_("Do not suppress warnings from system headers") },
{"error", &warn_dummy, 1,
N_("Treat all warnings as errors") },
{"shadow", &warn_dummy, 1,
N_("Warn when one local variable shadows another") },
{"switch", &warn_dummy, 1,
N_("Warn about enumerated switches, with no default, missing a case") },
{"switch-default", &warn_dummy, 1,
N_("Warn about enumerated switches missing a default case") },
{"switch-enum", &warn_dummy, 1,
N_("Warn about all enumerated switches missing a specific case") },
{"aggregate-return", &warn_dummy, 1,
N_("Warn about returning structures, unions or arrays") },
{"cast-align", &warn_dummy, 1,
N_("Warn about pointer casts which increase alignment") },
{"unreachable-code", &warn_dummy, 1,
N_("Warn about code that will never be executed") },
{"uninitialized", &warn_dummy, 1,
N_("Warn about uninitialized automatic variables") },
{"inline", &warn_dummy, 1,
N_("Warn when an inlined function cannot be inlined") },
{"packed", &warn_dummy, 1,
N_("Warn when the packed attribute has no effect on struct layout") },
{"padded", &warn_dummy, 1,
N_("Warn when padding is required to align struct members") },
{"disabled-optimization", &warn_dummy, 1,
N_("Warn when an optimization pass is disabled") },
{"deprecated-declarations", &warn_dummy, 1,
N_("Warn about uses of __attribute__((deprecated)) declarations") },
{"missing-noreturn", &warn_dummy, 1,
N_("Warn about functions which might be candidates for attribute noreturn") },
{"strict-aliasing", &warn_dummy, 1,
N_ ("Warn about code which might break the strict aliasing rules") }
};
/* Output files for assembler code (real compiler output) /* Output files for assembler code (real compiler output)
and debugging dumps. */ and debugging dumps. */
...@@ -3966,15 +3911,6 @@ display_help (void) ...@@ -3966,15 +3911,6 @@ display_help (void)
_(description)); _(description));
} }
for (i = ARRAY_SIZE (W_options); i--;)
{
const char *description = W_options[i].description;
if (description != NULL && *description != 0)
printf (" -W%-21s %s\n",
W_options[i].string, _(description));
}
for (i = ARRAY_SIZE (debug_args); i--;) for (i = ARRAY_SIZE (debug_args); i--;)
{ {
if (debug_args[i].description != NULL) if (debug_args[i].description != NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment