From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id kFBdOkNMzmA4bwAAWB0awg (envelope-from ) for ; Sat, 19 Jun 2021 15:57:55 -0400 Received: by simark.ca (Postfix, from userid 112) id ECA011F163; Sat, 19 Jun 2021 15:57:55 -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 5D5301E813 for ; Sat, 19 Jun 2021 15:57:55 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F0245388E82E for ; Sat, 19 Jun 2021 19:57:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F0245388E82E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1624132675; bh=eta3NB2PJ47b7+3MyCUD5pTtjbO+pr2D4sKdZpr/GEE=; 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=xsTYIo/mmlPMKLwoHRUGj7wIMPGY5xwYUn5mWWnE51bgh0mdKsstDSRnn0xFVF/U9 8d0UihX6iQu3ovIE3DSl+t1e1FFot2zwEzK4oihRwww14U9rzr1+sENgFMSWyhLW8o c1z+RXN1kyPC3t6wFycL2UkNc03CveWvFEyE86zU= Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 5BDA03835815 for ; Sat, 19 Jun 2021 19:57:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5BDA03835815 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 5B4DF335DC4; Sat, 19 Jun 2021 19:57:34 +0000 (UTC) Date: Sat, 19 Jun 2021 15:57:33 -0400 To: Simon Marchi Subject: Re: [PATCH 2/2] sim: unify werror build settings Message-ID: Mail-Followup-To: Simon Marchi , gdb-patches@sourceware.org References: <20210618052128.5014-1-vapier@gentoo.org> <20210618052128.5014-2-vapier@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 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