summaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog8
-rw-r--r--gcc/c-family/c-common.c3
-rw-r--r--gcc/c-family/c-common.h2
-rw-r--r--gcc/c-family/c-opts.c12
4 files changed, 18 insertions, 7 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index a9a55b3da43..1bbb95709cf 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,11 @@
+2010-11-12 Joseph Myers <joseph@codesourcery.com>
+
+ * c-common.c (parse_optimize_options): Update call to
+ decode_options.
+ * c-common.h (c_common_handle_option): Update prototype.
+ * c-opts.c (c_common_handle_option): Take location_t parameter and
+ pass it to other functions.
+
2010-11-11 Joseph Myers <joseph@codesourcery.com>
* c-opts.c (warning_as_error_callback): Remove.
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 154b6c94a76..7e716407508 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -7804,7 +7804,8 @@ parse_optimize_options (tree args, bool attr_p)
&decoded_options,
&decoded_options_count);
decode_options (&global_options, &global_options_set,
- decoded_options, decoded_options_count, global_dc);
+ decoded_options, decoded_options_count,
+ input_location, global_dc);
targetm.override_options_after_change();
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index 58d3a321e0f..eb6cf263325 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -696,7 +696,7 @@ extern void set_Wformat (int);
extern tree handle_format_attribute (tree *, tree, tree, int, bool *);
extern tree handle_format_arg_attribute (tree *, tree, tree, int, bool *);
extern bool attribute_takes_identifier_p (const_tree);
-extern bool c_common_handle_option (size_t, const char *, int, int,
+extern bool c_common_handle_option (size_t, const char *, int, int, location_t,
const struct cl_option_handlers *);
extern tree c_common_type_for_mode (enum machine_mode, int);
extern tree c_common_type_for_size (unsigned int, int);
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index 1a281c86fc8..7ddb7547978 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -241,7 +241,8 @@ c_common_init_options (unsigned int decoded_options_count,
invalid, true if valid. Use HANDLERS in recursive handle_option calls. */
bool
c_common_handle_option (size_t scode, const char *arg, int value,
- int kind, const struct cl_option_handlers *handlers)
+ int kind, location_t loc,
+ const struct cl_option_handlers *handlers)
{
const struct cl_option *option = &cl_options[scode];
enum opt_code code = (enum opt_code) scode;
@@ -357,7 +358,8 @@ c_common_handle_option (size_t scode, const char *arg, int value,
set_Wformat (value);
handle_generated_option (&global_options, &global_options_set,
OPT_Wimplicit, NULL, value,
- c_family_lang_mask, kind, handlers, global_dc);
+ c_family_lang_mask, kind, loc,
+ handlers, global_dc);
warn_char_subscripts = value;
warn_missing_braces = value;
warn_parentheses = value;
@@ -452,13 +454,13 @@ c_common_handle_option (size_t scode, const char *arg, int value,
if (warn_implicit_int == -1)
handle_generated_option (&global_options, &global_options_set,
OPT_Wimplicit_int, NULL, value,
- c_family_lang_mask, kind, handlers,
+ c_family_lang_mask, kind, loc, handlers,
global_dc);
if (warn_implicit_function_declaration == -1)
handle_generated_option (&global_options, &global_options_set,
OPT_Wimplicit_function_declaration, NULL,
- value, c_family_lang_mask, kind, handlers,
- global_dc);
+ value, c_family_lang_mask, kind, loc,
+ handlers, global_dc);
break;
case OPT_Winvalid_pch: