Convert diagnostic_override_option_index from macro to inline function

gcc/ChangeLog:
	* diagnostic.h (diagnostic_override_option_index): Convert from
	macro to inline function.

From-SVN: r247665
This commit is contained in:
David Malcolm 2017-05-05 21:05:15 +00:00 committed by David Malcolm
parent 26d5ed6cea
commit 62a77bdfe9
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2017-05-05 David Malcolm <dmalcolm@redhat.com>
* diagnostic.h (diagnostic_override_option_index): Convert from
macro to inline function.
2017-05-05 David Malcolm <dmalcolm@redhat.com>
* diagnostic.c (last_module_changed_p): New function.

View File

@ -270,8 +270,12 @@ extern diagnostic_context *global_dc;
/* Override the option index to be used for reporting a
diagnostic. */
#define diagnostic_override_option_index(DI, OPTIDX) \
((DI)->option_index = (OPTIDX))
static inline void
diagnostic_override_option_index (diagnostic_info *info, int optidx)
{
info->option_index = optidx;
}
/* Diagnostic related functions. */
extern void diagnostic_initialize (diagnostic_context *, int);