From 481e1176d7614dcd519e50c488a155312280913e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 11 Aug 2010 11:04:43 +0100 Subject: 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 --- gcc/c-family/ChangeLog | 5 +++++ gcc/c-family/c-opts.c | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'gcc/c-family') 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 + + * c-opts.c (c_common_handle_option): Call handle_generated_option + instead of handle_option. + 2010-08-08 Nathan Froyd * 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: -- cgit v1.1