This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Simulator: prevent inlining in C++ mode


Simulator: prevent inlining in C++ mode

sim-arange.c contains C code and cannot be built with C++ compiler.
Instead, it should be built separately by C compiler w/o inlining.

sim/common/Changelog:
2019-01-11  Pavel I. Kryukov  <kryukov@frtk.ru>

        * sim-inline.h: don't define HAVE_INLINE with __cplusplus

diff --git a/sim/common/sim-inline.h b/sim/common/sim-inline.h
index b2a3fc3..e9fb5c7 100644
--- a/sim/common/sim-inline.h
+++ b/sim/common/sim-inline.h
@@ -282,7 +282,7 @@


 #ifndef HAVE_INLINE
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(__cplusplus)
 #define HAVE_INLINE
 #endif
 #endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]