]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: Fix definition of SIM_ARANGE_INLINE
authorSimon Marchi <simon.marchi@ericsson.com>
Tue, 15 Jan 2019 22:45:39 +0000 (17:45 -0500)
committerSimon Marchi <simon.marchi@ericsson.com>
Tue, 15 Jan 2019 22:46:40 +0000 (17:46 -0500)
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.

sim/common/ChangeLog
sim/common/sim-arange.h

index 01ee122b019c88707a8c7b3d263d3ca147f62b68..a95735a47937fbe73293c9c4e1e689311b7af4d7 100644 (file)
@@ -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
index ce84c1138ad339b35e9c766ae3d39bbc9dbcc6af..f2ac595390f43e9d488d9bd9ce7e248ed73b3443 100644 (file)
@@ -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.