aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-08-11 11:04:43 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2010-08-11 11:04:43 +0100
commit481e1176d7614dcd519e50c488a155312280913e (patch)
tree48318d1dff4b32ecb5516a974e71f0e815752ba3 /gcc/c-family
parent3abeaf8f89f246f481c869a09d0715a2762bde28 (diff)
downloadgcc-481e1176d7614dcd519e50c488a155312280913e.zip
gcc-481e1176d7614dcd519e50c488a155312280913e.tar.gz
gcc-481e1176d7614dcd519e50c488a155312280913e.tar.bz2
opts.h (struct cl_option_handler_func): Make handler take cl_decoded_option structure as parameter, not individual elements.
* opts.h (struct cl_option_handler_func): Make handler take cl_decoded_option structure as parameter, not individual elements. (struct cl_option_handlers): Make callbacks take cl_decoded_option structure as parameter, not individual elements. (handle_option): Take cl_decoded_option structure as parameter, not individual elements. (handle_generated_option): Declare. * opts-common.c (handle_option): Take cl_decoded_option structure as parameter, not individual elements. Update calls to callback and handler functions. (handle_generated_option): New. (read_cmdline_option): Update calls to callback functions and handle_option. * opts.c (common_handle_option, complain_wrong_lang, unknown_option_callback, post_handling_callback, lang_handle_option, target_handle_option): Take cl_decoded_option structure as parameter, not individual elements. (lang_handle_option, target_handle_option, common_handle_option): Assert option has at most one argument. (enable_warning_as_error): Call handle_generated_option instead of handle_option. Do not pass -Werror argument as argument of generated option. c-family: * c-opts.c (c_common_handle_option): Call handle_generated_option instead of handle_option. From-SVN: r163095
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog5
-rw-r--r--gcc/c-family/c-opts.c12
2 files changed, 11 insertions, 6 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 5227a9c..ce4fa36 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-11 Joseph Myers <joseph@codesourcery.com>
+
+ * c-opts.c (c_common_handle_option): Call handle_generated_option
+ instead of handle_option.
+
2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
* c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index 85e4cbf..b46b0a0 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -437,8 +437,8 @@ c_common_handle_option (size_t scode, const char *arg, int value,
case OPT_Wall:
warn_unused = value;
set_Wformat (value);
- handle_option (OPT_Wimplicit, NULL, value, c_family_lang_mask, kind,
- handlers);
+ handle_generated_option (OPT_Wimplicit, NULL, value,
+ c_family_lang_mask, kind, handlers);
warn_char_subscripts = value;
warn_missing_braces = value;
warn_parentheses = value;
@@ -539,11 +539,11 @@ c_common_handle_option (size_t scode, const char *arg, int value,
case OPT_Wimplicit:
gcc_assert (value == 0 || value == 1);
if (warn_implicit_int == -1)
- handle_option (OPT_Wimplicit_int, NULL, value,
- c_family_lang_mask, kind, handlers);
+ handle_generated_option (OPT_Wimplicit_int, NULL, value,
+ c_family_lang_mask, kind, handlers);
if (warn_implicit_function_declaration == -1)
- handle_option (OPT_Wimplicit_function_declaration, NULL, value,
- c_family_lang_mask, kind, handlers);
+ handle_generated_option (OPT_Wimplicit_function_declaration, NULL,
+ value, c_family_lang_mask, kind, handlers);
break;
case OPT_Wimport: