[PATCH] Make all usage of "input_location" be explicit
Tom Tromey
tromey@redhat.com
Tue Jul 2 16:33:00 GMT 2013
>>>>> "David" == David Malcolm <dmalcolm@redhat.com> writes:
David> gcc/java/
David> 2013-07-02 David Malcolm <dmalcolm@redhat.com>
David> * class.c (maybe_layout_super_class): Update comment.
David> * decl.c (java_add_stmt): Remove use of input_filename macro.
David> * jcf-parse.c (set_source_filename): Remove use of
David> input_filename macro.
David> (parse_class_file): Remove use of input_line and input_filename
David> macros.
David> (java_parse_file): Remove use of input_filename macro.
The java parts are ok. Thanks for doing this.
I was curious about this bit:
David> diff --git a/gcc/tree-diagnostic.c b/gcc/tree-diagnostic.c
David> index 087cf6a..2942365 100644
David> --- a/gcc/tree-diagnostic.c
David> +++ b/gcc/tree-diagnostic.c
David> @@ -39,7 +39,8 @@ diagnostic_report_current_function (diagnostic_context *context,
David> diagnostic_info *diagnostic)
David> {
David> diagnostic_report_current_module (context, diagnostic->location);
David> - lang_hooks.print_error_function (context, input_filename, diagnostic);
David> + lang_hooks.print_error_function (context, LOCATION_FILE (input_location),
David> + diagnostic);
I wonder why this needs to use input_location rather than
diagnostic->location. (I don't actually know this code, maybe it is
obvious to those who do.)
Tom
More information about the Gcc-patches
mailing list