Commit 2d615444 by Neil Booth Committed by Neil Booth

c-decl.c (c_decode_option): No need to handle switches cpplib handles.

	* c-decl.c (c_decode_option): No need to handle switches
	cpplib handles.
cp:
	* decl2.c (cxx_decode_option): Similarly.

From-SVN: r55737
parent c82efc81
2002-07-25 Neil Booth <neil@daikokuya.co.uk>
* c-decl.c (c_decode_option): No need to handle switches
cpplib handles.
2002-07-24 Zack Weinberg <zack@codesourcery.com> 2002-07-24 Zack Weinberg <zack@codesourcery.com>
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE, * defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
......
...@@ -454,16 +454,13 @@ c_decode_option (argc, argv) ...@@ -454,16 +454,13 @@ c_decode_option (argc, argv)
static const struct { static const struct {
/* The name of the option. */ /* The name of the option. */
const char *option; const char *option;
/* If non-NULL, a flag variable to set to 0 or 1. If NULL, /* A pointer to a flag variable to set to 0 or 1. */
this means that cpp handles this option. */
int *flag; int *flag;
} warn_options[] = { } warn_options[] = {
/* This list is in alphabetical order. Keep it like that. */ /* This list is in alphabetical order. Keep it like that. */
{ "bad-function-cast", &warn_bad_function_cast }, { "bad-function-cast", &warn_bad_function_cast },
{ "cast-qual", &warn_cast_qual }, { "cast-qual", &warn_cast_qual },
{ "char-subscripts", &warn_char_subscripts }, { "char-subscripts", &warn_char_subscripts },
{ "comment", NULL },
{ "comments", NULL },
{ "conversion", &warn_conversion }, { "conversion", &warn_conversion },
{ "div-by-zero", &warn_div_by_zero }, { "div-by-zero", &warn_div_by_zero },
{ "float-equal", &warn_float_equal }, { "float-equal", &warn_float_equal },
...@@ -474,7 +471,6 @@ c_decode_option (argc, argv) ...@@ -474,7 +471,6 @@ c_decode_option (argc, argv)
{ "format-y2k", &warn_format_y2k }, { "format-y2k", &warn_format_y2k },
{ "implicit-function-declaration", &mesg_implicit_function_declaration }, { "implicit-function-declaration", &mesg_implicit_function_declaration },
{ "implicit-int", &warn_implicit_int }, { "implicit-int", &warn_implicit_int },
{ "import", NULL },
{ "long-long", &warn_long_long }, { "long-long", &warn_long_long },
{ "main", &warn_main }, { "main", &warn_main },
{ "missing-braces", &warn_missing_braces }, { "missing-braces", &warn_missing_braces },
...@@ -492,8 +488,6 @@ c_decode_option (argc, argv) ...@@ -492,8 +488,6 @@ c_decode_option (argc, argv)
{ "sign-compare", &warn_sign_compare }, { "sign-compare", &warn_sign_compare },
{ "strict-prototypes", &warn_strict_prototypes }, { "strict-prototypes", &warn_strict_prototypes },
{ "traditional", &warn_traditional }, { "traditional", &warn_traditional },
{ "trigraphs", NULL },
{ "undef", NULL },
{ "write-strings", &flag_const_strings } { "write-strings", &flag_const_strings }
}; };
...@@ -694,7 +688,6 @@ c_decode_option (argc, argv) ...@@ -694,7 +688,6 @@ c_decode_option (argc, argv)
size_t i; size_t i;
for (i = 0; i < ARRAY_SIZE (warn_options); i++) for (i = 0; i < ARRAY_SIZE (warn_options); i++)
if (strncmp (p, "-W", 2) == 0 if (strncmp (p, "-W", 2) == 0
&& warn_options[i].flag
&& (strcmp (p+2, warn_options[i].option) == 0 && (strcmp (p+2, warn_options[i].option) == 0
|| (strncmp (p+2, "no-", 3) == 0 || (strncmp (p+2, "no-", 3) == 0
&& strcmp (p+5, warn_options[i].option) == 0))) && strcmp (p+5, warn_options[i].option) == 0)))
......
...@@ -650,14 +650,6 @@ cxx_decode_option (argc, argv) ...@@ -650,14 +650,6 @@ cxx_decode_option (argc, argv)
warn_nontemplate_friend = setting; warn_nontemplate_friend = setting;
else if (!strcmp (p, "deprecated")) else if (!strcmp (p, "deprecated"))
warn_deprecated = setting; warn_deprecated = setting;
else if (!strcmp (p, "comment"))
; /* cpp handles this one. */
else if (!strcmp (p, "comments"))
; /* cpp handles this one. */
else if (!strcmp (p, "trigraphs"))
; /* cpp handles this one. */
else if (!strcmp (p, "import"))
; /* cpp handles this one. */
else if (!strcmp (p, "all")) else if (!strcmp (p, "all"))
{ {
warn_return_type = setting; warn_return_type = setting;
......
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