aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2017-05-05 21:05:15 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2017-05-05 21:05:15 +0000
commit62a77bdfe9b0497d20f5556c5baf2999ce152bc1 (patch)
tree786acf80ee343832b9bb888d00438bcfc6eb2f20
parent26d5ed6ceaddb1ca32b34d556e57f082eb38a967 (diff)
downloadgcc-62a77bdfe9b0497d20f5556c5baf2999ce152bc1.zip
gcc-62a77bdfe9b0497d20f5556c5baf2999ce152bc1.tar.gz
gcc-62a77bdfe9b0497d20f5556c5baf2999ce152bc1.tar.bz2
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
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/diagnostic.h8
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 <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.
(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);