public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] sim: unify werror build settings
Date: Sat, 19 Jun 2021 15:57:33 -0400	[thread overview]
Message-ID: <YM5MLXB+dNWA2TtC@vapier> (raw)
In-Reply-To: <da29d27d-3ca9-4ba9-a932-80a9acb0040d@polymtl.ca>

On 19 Jun 2021 10:39, Simon Marchi wrote:
> On 2021-06-18 1:21 a.m., Mike Frysinger via Gdb-patches wrote:
> > Move these options up to the common dir so we only test & export
> > them once across all ports.  It also enables -Werror usage on the
> > common files we've been pulling out of arch subdirs.
> 
> I get:
> 
> 
>   CC       common/common_libcommon_a-sim-load.o
> In file included from /home/simark/src/binutils-gdb/sim/common/sim-n-bits.h:27,
>                  from /home/simark/src/binutils-gdb/sim/common/sim-bits.c:259,
>                  from /home/simark/src/binutils-gdb/sim/common/sim-bits.h:599,
>                  from /home/simark/src/binutils-gdb/sim/common/sim-basics.h:122,
>                  from /home/simark/src/binutils-gdb/sim/common/sim-load.c:30:
> /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:39:27: error: ‘offset_16’ defined but not used [-Werror=unused-function]
>    39 | #define offset_N XCONCAT2(offset_,N)
>       |                           ^~~~~~~
> /home/simark/src/binutils-gdb/sim/../include/symcat.h:23:26: note: in definition of macro ‘CONCAT2’
>    23 | #define CONCAT2(a,b)     a##b
>       |                          ^
> /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:39:18: note: in expansion of macro ‘XCONCAT2’
>    39 | #define offset_N XCONCAT2(offset_,N)
>       |                  ^~~~~~~~
> /home/simark/src/binutils-gdb/sim/common/sim-n-endian.h:138:1: note: in expansion of macro ‘offset_N’
>   138 | offset_N (unsigned_N *x,
>       | ^~~~~~~~
> 
> This works:
> 
> 
> diff --git a/sim/common/sim-inline.h b/sim/common/sim-inline.h
> index 2750fa93cbc7..cad36e796cbc 100644
> --- a/sim/common/sim-inline.h
> +++ b/sim/common/sim-inline.h
> @@ -445,7 +445,7 @@
>       && !defined (SIM_ENDIAN_C) \
>       && (REVEAL_MODULE_P (SIM_ENDIAN_INLINE)))
>  # if (SIM_ENDIAN_INLINE & INLINE_GLOBALS)
> -#  define INLINE_SIM_ENDIAN(TYPE) static INLINE TYPE UNUSED
> +#  define INLINE_SIM_ENDIAN(TYPE) static INLINE2 TYPE UNUSED
>  #  define EXTERN_SIM_ENDIAN_P 0
>  # else
>  #  define INLINE_SIM_ENDIAN(TYPE) static TYPE UNUSED

the type is already marked UNUSED.  why isn't that working here ?

i tried to reproduce with -O0 but it's passing for me.
-mike

  reply	other threads:[~2021-06-19 19:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18  5:21 [PATCH 1/2] sim: create a makefile fragment to pass common settings Mike Frysinger
2021-06-18  5:21 ` [PATCH 2/2] sim: unify werror build settings Mike Frysinger
2021-06-19 14:39   ` Simon Marchi
2021-06-19 19:57     ` Mike Frysinger [this message]
2021-06-20  1:33       ` Simon Marchi
2021-06-18  6:25 ` [PATCH 1.5/2] sim: move -Werror disabling to Makefile Mike Frysinger

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=YM5MLXB+dNWA2TtC@vapier \
    --to=vapier@gentoo.org \
    --cc=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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).