This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] sim: Fix definition of SIM_ARANGE_INLINE
- From: Simon Marchi <simark at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 15 Jan 2019 22:47:00 -0000
- Subject: [binutils-gdb] sim: Fix definition of SIM_ARANGE_INLINE
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=dc7e818497f0af0a3ee569f6eee0ad74e19b4bc2
commit dc7e818497f0af0a3ee569f6eee0ad74e19b4bc2
Author: Simon Marchi <simon.marchi@ericsson.com>
Date: Tue Jan 15 17:45:39 2019 -0500
sim: Fix definition of SIM_ARANGE_INLINE
If HAVE_INLINE is false, SIM_ARANGE_INLINE is currently defined as
#define SIM_ARANGE_INLINE EXTERN
However, EXTERN is not defined anywhere, leading to errors such as:
In file included from
/mipt-mips/simulator/../../sim/common/sim-basics.h:147:0,
from /mipt-mips/simulator/export/gdb/sim-main.h:13,
from /mipt-mips/simulator/export/gdb/gdb_interface.cpp:7:
/mipt-mips/simulator/../../sim/common/sim-arange.h:71:27: error: â??EXTERNâ??
does not name a type; did you mean â??EUSERSâ???
#define SIM_ARANGE_INLINE EXTERN
^
/mipt-mips/simulator/../../sim/common/sim-arange.h:76:1: note: in expansion
of macro â??SIM_ARANGE_INLINEâ??
SIM_ARANGE_INLINE int
^~~~~~~~~~~~~~~~~
I (Simon) have reproduced the problem by simply removing the HAVE_INLINE
definition. This was originally reported by Pavel I. Kryukov
<kryukov@frtk.ru>.
sim/common/ChangeLog:
* sim-arange.h (SIM_ARANGE_INLINE): Change EXTERN to extern.
Diff:
---
sim/common/ChangeLog | 4 ++++
sim/common/sim-arange.h | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 01ee122..a95735a 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,7 @@
+2019-01-15 Simon Marchi <simon.marchi@ericsson.com>
+
+ * sim-arange.h (SIM_ARANGE_INLINE): Change EXTERN to extern.
+
2018-12-18 Andrew Burgess <andrew.burgess@embecosm.com>
* sim-syscall.c (sim_syscall_multi): Don't update sc->errcode at
diff --git a/sim/common/sim-arange.h b/sim/common/sim-arange.h
index ce84c11..f2ac595 100644
--- a/sim/common/sim-arange.h
+++ b/sim/common/sim-arange.h
@@ -68,7 +68,7 @@ extern void sim_addr_range_delete (ADDR_RANGE * /*ar*/,
#define SIM_ARANGE_INLINE EXTERN_INLINE
#endif
#else
-#define SIM_ARANGE_INLINE EXTERN
+#define SIM_ARANGE_INLINE extern
#endif
/* Return non-zero if ADDR is in range AR, traversing the entire tree.