public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH/committed 2/2] sim: mn10300: enable -Werror
Date: Wed, 16 Jun 2021 14:01:13 -0400	[thread overview]
Message-ID: <1d11e4f9-bdd2-c8cc-dd8c-7ea9dd2816e4@polymtl.ca> (raw)
In-Reply-To: <YMo6T7hNGbyZiE9Y@vapier>

On 2021-06-16 1:52 p.m., Mike Frysinger wrote:
> On 16 Jun 2021 11:47, Simon Marchi wrote:
>> On 2021-06-16 11:35 a.m., Simon Marchi via Gdb-patches wrote:
>>> On 2021-06-14 11:47 p.m., Mike Frysinger via Gdb-patches wrote:
>>>> Now that all warnings are fixed in this port, enable -Werror by default.
>>>
>>> I get:
>>>
>>> $ gcc --version
>>> gcc (GCC) 11.1.0
>>> $ ccache gcc  -DHAVE_CONFIG_H  -DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31 -DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE  -DWITH_HW=1 -DHAVE_DV_SOCKSER -DDEFAULT_INLINE=0 -DWITH_RESERVED_BITS=1  -Wall -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type -Wold-style-declaration -Werror  -I. -I/home/simark/src/binutils-gdb/sim/mn10300 -I../common -I/home/simark/src/binutils-gdb/sim/mn10300/../common -I../../include -I/home/simark/src/binutils-gdb/sim/mn10300/../../include -I../../bfd -I/home/simark/src/binutils-gdb/sim/mn10300/../../bfd -I../../opcodes -I/home/simark/src/binutils-gdb/sim/mn10300/../../opcodes -I../..  -I/home/simark/src/binutils-gdb/sim/mn10300/../../gnulib/import -I../../gnulib/import -DPOLL_QUIT_INTERVAL=0x20 -g3 -O0 -fsanitize=address -fmax-errors=1 -fdiagnostics-color=always   -c -o idecode.o -MT idecode.o -MMD -MP -MF .deps/idecode.Tpo idecode.c
>>> In file included from /home/simark/src/binutils-gdb/sim/mn10300/sim-main.h:47,
>>>                  from /home/simark/src/binutils-gdb/sim/mn10300/../common/sim-inline.c:33,
>>>                  from idecode.c:26:
>>> /home/simark/src/binutils-gdb/sim/mn10300/mn10300_sim.h:189:1: error: ‘dw2u64’ defined but not used [-Werror=unused-function]
>>>   189 | dw2u64 (dword data)
>>>       | ^~~~~~
>>
>> This fixes it for me, I guess that INLINE is undefined at this point.
>> I don't see any reason not to use "inline".
> 
> looks like the failure only comes up with -O0:
> 
> #if defined (__GNUC__) && defined (__OPTIMIZE__)
> #define INLINE __inline__
> #else           
> #define INLINE /*inline*/
> #endif
> 
> we could use INLINE2 here instead as it doesn't check OPTIMIZE.
> -mike
> 

OK, I'll let you fix it.

Simon

  reply	other threads:[~2021-06-16 18:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15  3:47 [PATCH/committed 1/2] sim: mn10300: switch abort to sim_engine_abort Mike Frysinger
2021-06-15  3:47 ` [PATCH/committed 2/2] sim: mn10300: enable -Werror Mike Frysinger
2021-06-16 15:35   ` Simon Marchi
2021-06-16 15:47     ` Simon Marchi
2021-06-16 17:52       ` Mike Frysinger
2021-06-16 18:01         ` Simon Marchi [this message]
2021-06-17  4:14           ` [PATCH/committed] sim: mn10300: tweak static inlines 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=1d11e4f9-bdd2-c8cc-dd8c-7ea9dd2816e4@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    /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).