From 62a77bdfe9b0497d20f5556c5baf2999ce152bc1 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 5 May 2017 21:05:15 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/diagnostic.h | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 56ec279..05f68fd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2017-05-05 David Malcolm + * diagnostic.h (diagnostic_override_option_index): Convert from + macro to inline function. + +2017-05-05 David Malcolm + * diagnostic.c (last_module_changed_p): New function. (set_last_module): New function. (diagnostic_report_current_module): Convert macro usage to diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h index 89d5a08..c419b00 100644 --- a/gcc/diagnostic.h +++ b/gcc/diagnostic.h @@ -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); -- 2.7.4