From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id gEkdKGU6ymAyEwAAWB0awg (envelope-from ) for ; Wed, 16 Jun 2021 13:52:37 -0400 Received: by simark.ca (Postfix, from userid 112) id A211E1F163; Wed, 16 Jun 2021 13:52:37 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 57E311E939 for ; Wed, 16 Jun 2021 13:52:37 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7EA26387740A for ; Wed, 16 Jun 2021 17:52:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7EA26387740A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1623865956; bh=qDOl1h2eJ3B4raVEqUNVDCgKVe2p60djpuewMXYL/aM=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=yLDBJHc5wBKNmnOOFE7vX2BlP+myHoScetMqs5YCHHsi1NZRJsEasGykNSU8Md1bf JebsXTxLFHS6pOyHC+roO3ebe5Yah/rqbB5prN5r3PtyxQuaGxB8/Hgm2Fj2lKFYa1 T1cVaCIN1ldxZkidPebkrLoU6rRyR2u6KXz/wvVQ= Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 43BDE38618BB for ; Wed, 16 Jun 2021 17:52:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 43BDE38618BB Received: from vapier (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6D566340E12; Wed, 16 Jun 2021 17:52:16 +0000 (UTC) Date: Wed, 16 Jun 2021 13:52:15 -0400 To: Simon Marchi Subject: Re: [PATCH/committed 2/2] sim: mn10300: enable -Werror Message-ID: Mail-Followup-To: Simon Marchi , gdb-patches@sourceware.org References: <20210615034733.28752-1-vapier@gentoo.org> <20210615034733.28752-2-vapier@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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 defaul= t. > >=20 > > I get: > >=20 > > $ gcc --version > > gcc (GCC) 11.1.0 > > $ ccache gcc -DHAVE_CONFIG_H -DWITH_TARGET_WORD_BITSIZE=3D32 -DWITH_T= ARGET_WORD_MSB=3D31 -DWITH_TARGET_BYTE_ORDER=3DBFD_ENDIAN_LITTLE -DWITH_HW= =3D1 -DHAVE_DV_SOCKSER -DDEFAULT_INLINE=3D0 -DWITH_RESERVED_BITS=3D1 -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-t= ype -Wold-style-declaration -Werror -I. -I/home/simark/src/binutils-gdb/si= m/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../../o= pcodes -I/home/simark/src/binutils-gdb/sim/mn10300/../../opcodes -I../.. -= I/home/simark/src/binutils-gdb/sim/mn10300/../../gnulib/import -I../../gnul= ib/import -DPOLL_QUIT_INTERVAL=3D0x20 -g3 -O0 -fsanitize=3Daddress -fmax-er= rors=3D1 -fdiagnostics-color=3Dalways -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-mai= n.h:47, > > from /home/simark/src/binutils-gdb/sim/mn10300/../comm= on/sim-inline.c:33, > > from idecode.c:26: > > /home/simark/src/binutils-gdb/sim/mn10300/mn10300_sim.h:189:1: error: = =E2=80=98dw2u64=E2=80=99 defined but not used [-Werror=3Dunused-function] > > 189 | dw2u64 (dword data) > > | ^~~~~~ >=20 > 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 =20 #define INLINE /*inline*/ #endif we could use INLINE2 here instead as it doesn't check OPTIMIZE. -mike