This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Make all usage of "input_location" be explicit

>>>>> "David" == David Malcolm <> writes:

David> gcc/java/
David> 2013-07-02  David Malcolm  <>
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.)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]