Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/2] sim: use INLINE2 in STATIC_INLINE's definition
Date: Sat, 19 Jun 2021 21:35:32 -0400	[thread overview]
Message-ID: <20210620013532.578626-2-simon.marchi@polymtl.ca> (raw)
In-Reply-To: <20210620013532.578626-1-simon.marchi@polymtl.ca>

I get this when building with gcc 11:

    make[2]: Entering directory '/home/simark/build/binutils-gdb/sim/m68hc11'
      CC     interp.o
    In file included from /home/simark/src/binutils-gdb/sim/m68hc11/interp.c:23:
    /home/simark/src/binutils-gdb/sim/m68hc11/sim-main.h:515:1: error: ‘cpu_fetch16’ defined but not used [-Werror=unused-function]
      515 | cpu_fetch16 (sim_cpu *cpu)
          | ^~~~~~~~~~~

cpu_fetch uses STATIC_INLINE, but STATIC_INLINE uses INLINE, which is
defined to nothing when building without optimizations.  Use INLINE2
instead, which is always defined (for gcc at least).

sim/common/ChangeLog:

	* sim-inline.h (STATIC_INLINE): Use INLINE2.

Change-Id: If91b4b3933667ffca0bf1ac855331ca50af6b974
---
 sim/common/sim-inline.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sim/common/sim-inline.h b/sim/common/sim-inline.h
index 6ac4942e3521..e66324cb4786 100644
--- a/sim/common/sim-inline.h
+++ b/sim/common/sim-inline.h
@@ -314,7 +314,7 @@
 /* Your compiler's static inline prefix */
 
 #ifndef STATIC_INLINE
-#define STATIC_INLINE static INLINE
+#define STATIC_INLINE static INLINE2
 #endif
 
 
-- 
2.32.0


  reply	other threads:[~2021-06-20  1:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-20  1:35 [PATCH 1/2] sim: move UNUSED before TYPE in SIM_ENDIAN_INLINE's definition Simon Marchi via Gdb-patches
2021-06-20  1:35 ` Simon Marchi via Gdb-patches [this message]
2021-06-20  2:07 ` Mike Frysinger via Gdb-patches
2021-06-20  2:21   ` Simon Marchi via Gdb-patches
2021-06-20  2:47     ` Mike Frysinger via Gdb-patches
2021-06-20  2:50       ` Simon Marchi via Gdb-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210620013532.578626-2-simon.marchi@polymtl.ca \
    --to=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox