From patchwork Fri Jan 11 09:59:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?0J/QsNCy0LXQuyDQmtGA0Y7QutC+0LI=?= X-Patchwork-Id: 31034 Received: (qmail 5435 invoked by alias); 11 Jan 2019 09:59:14 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 5424 invoked by uid 89); 11 Jan 2019 09:59:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, FROM_EXCESS_BASE64, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=sim, __GNUC__, __gnuc__, H*c:alternative X-HELO: mail-io1-f66.google.com Received: from mail-io1-f66.google.com (HELO mail-io1-f66.google.com) (209.85.166.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 11 Jan 2019 09:59:12 +0000 Received: by mail-io1-f66.google.com with SMTP id l14so11724771ioj.5 for ; Fri, 11 Jan 2019 01:59:12 -0800 (PST) MIME-Version: 1.0 From: =?UTF-8?B?0J/QsNCy0LXQuyDQmtGA0Y7QutC+0LI=?= Date: Fri, 11 Jan 2019 12:59:01 +0300 Message-ID: Subject: [PATCH] Simulator: prevent inlining in C++ mode To: gdb-patches@sourceware.org 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 * 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