Message ID | 20220906075733.fmnxdgdcb2trbv3q@lug-owl.de |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp514815wrt; Tue, 6 Sep 2022 00:58:02 -0700 (PDT) X-Google-Smtp-Source: AA6agR7CUUbs2KjwZfiek012cdWmmp7V4j/gFB618EVenko4zHNlrJefOvGw10uLpsgdeXQ5kipD X-Received: by 2002:a17:907:162a:b0:742:7a6:a812 with SMTP id hb42-20020a170907162a00b0074207a6a812mr24671468ejc.403.1662451082604; Tue, 06 Sep 2022 00:58:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662451082; cv=none; d=google.com; s=arc-20160816; b=To/i2uw0AYHB384NPwOTkYvLIjXGYGTO8hiUs++F68KF3v0OqhymPpueETG+pjYwMf n2YP26z1nl+AQib/CBwsXjnD5GJEmGvT58smsqqEwWTLmWIIuKVm39gDUp7pCjZu5Jk1 UkL8+vRBKzXdDLP3yi1t/Z9Y4kE1A+gwqSe5MkDW9OutDAWDlUqgKfGnWMvPd8CP8oZ4 R9cxg2YHis13et7kDbFr+uNwJvf/wmBer1mMCS0LktZ6pMUBaQ0or3OQq8fHjWoDY4IC moITlXY7Zs31pHau62j42IArw97DhEz4BGUO/F7NhCdg5/vNKdV5waFV8IWPY41d5+Wi Un0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dmarc-filter :delivered-to; bh=fC+Q3WyBsgtVavYUfxGDyNBcEB3+LrUjzQk+t1HsXq0=; b=G2pSSR0MOXyb82NVZsO03qD6GfuKMEFDOzUI8zgCQr3XeIf45PFxm67UHuSmnc7NMi 69yAVltVlH7H4bkKBnM6bU8pHVMprZdcegBXT3nnDguiboPBvY5eD6cKmm5HYtZgmGqb IMuF3nj1H6IMeZ92mH5ZoooGlzmxEUcSJhusi2tWWFnbfoJA4rj8rzb0QvbS3X7wEBdF FJn/HaCOB+CeQweh7UAO6oQFOFC02wIUCZI+8268ZuhnzjUiKXejoXtswdaaDRS/7XTo NHD7g9tuS1tZx6OwiLXJEOmXqW9Dtq6aY9i8g5Rdcr6gy9Ls70hczYliIE9bd6L/AQ/9 utAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id w11-20020a50d78b000000b00448c82377f4si8233889edi.302.2022.09.06.00.58.02 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 00:58:02 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8CC5138515CB for <ouuuleilei@gmail.com>; Tue, 6 Sep 2022 07:57:58 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from lug-owl.de (lug-owl.de [IPv6:2a03:4000:10:469::]) by sourceware.org (Postfix) with ESMTPS id E927E3858C2F for <gcc-patches@gcc.gnu.org>; Tue, 6 Sep 2022 07:57:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E927E3858C2F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lug-owl.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lug-owl.de Received: by lug-owl.de (Postfix, from userid 1001) id 2107F41FA7; Tue, 6 Sep 2022 09:57:33 +0200 (CEST) Date: Tue, 6 Sep 2022 09:57:33 +0200 From: Jan-Benedict Glaw <jbglaw@lug-owl.de> To: Nick Clifton <nickc@redhat.com> Subject: [PATCH] msp430: Mark unused attribute Message-ID: <20220906075733.fmnxdgdcb2trbv3q@lug-owl.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gfk5wufftue5mayv" Content-Disposition: inline X-Operating-System: Linux chamaeleon 5.14.0-0.bpo.2-amd64 X-gpg-fingerprint: 250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB X-gpg-key: wwwkeys.de.pgp.net X-Echelon-Enable: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll X-TKUeV: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll X-message-flag: Please send plain text messages only. Do not send HTML emails. Thank you. User-Agent: NeoMutt/20170113 (1.7.2) X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Cc: gcc-patches@gcc.gnu.org Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1743206306387177153?= X-GMAIL-MSGID: =?utf-8?q?1743206306387177153?= |
Series |
msp430: Mark unused attribute
|
|
Commit Message
Jan-Benedict Glaw
Sept. 6, 2022, 7:57 a.m. UTC
Hi Nick! This patch fixes a small warning in the msp430 backend (tested for --target=msp430-elf and --target=msp430-elfbare). .../gcc/configure --prefix=... --enable-werror-always --enable-languages=all --disable-gcov --disable-shared --disable-threads --target=msp430-elf --without-headers [...] make V=1 all-gcc [...] /usr/lib/gcc-snapshot/bin/g++ -fno-PIE -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libcody -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/gcc/../libbacktrace -o msp430.o -MT msp430.o -MMD -MP -MF ./.deps/msp430.TPo ../../gcc/gcc/config/msp430/msp430.cc ../../gcc/gcc/config/msp430/msp430.cc: In function 'int msp430_single_op_cost(rtx, bool, rtx)': ../../gcc/gcc/config/msp430/msp430.cc:1463:49: error: unused parameter 'outer_rtx' [-Werror=unused-parameter] 1463 | msp430_single_op_cost (rtx dst, bool speed, rtx outer_rtx) | ~~~~^~~~~~~~~ cc1plus: all warnings being treated as errors make[1]: *** [Makefile:2440: msp430.o] Error 1 make[1]: Leaving directory '/var/lib/laminar/run/gcc-msp430-elf/1/toolchain-build/gcc' make: *** [Makefile:4584: all-gcc] Error 2 2022-09-06 Jan-Benedict Glaw <jbglaw@lug-owl.de> gcc/ChangeLog: * config/msp430/msp430.cc (msp430_single_op_cost): Mark unused argument. Okay for HEAD? Thanks, Jan-Benedict --
Comments
On Tue, Sep 6, 2022 at 9:57 AM Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote: > > Hi Nick! > > This patch fixes a small warning in the msp430 backend (tested for > --target=msp430-elf and --target=msp430-elfbare). > > .../gcc/configure --prefix=... --enable-werror-always --enable-languages=all --disable-gcov --disable-shared --disable-threads --target=msp430-elf --without-headers > [...] > make V=1 all-gcc > [...] > /usr/lib/gcc-snapshot/bin/g++ -fno-PIE -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libcody -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/gcc/../libbacktrace -o msp430.o -MT msp430.o -MMD -MP -MF ./.deps/msp430.TPo ../../gcc/gcc/config/msp430/msp430.cc > ../../gcc/gcc/config/msp430/msp430.cc: In function 'int msp430_single_op_cost(rtx, bool, rtx)': > ../../gcc/gcc/config/msp430/msp430.cc:1463:49: error: unused parameter 'outer_rtx' [-Werror=unused-parameter] > 1463 | msp430_single_op_cost (rtx dst, bool speed, rtx outer_rtx) > | ~~~~^~~~~~~~~ > cc1plus: all warnings being treated as errors > make[1]: *** [Makefile:2440: msp430.o] Error 1 > make[1]: Leaving directory '/var/lib/laminar/run/gcc-msp430-elf/1/toolchain-build/gcc' > make: *** [Makefile:4584: all-gcc] Error 2 > > > > 2022-09-06 Jan-Benedict Glaw <jbglaw@lug-owl.de> > > gcc/ChangeLog: > * config/msp430/msp430.cc (msp430_single_op_cost): Mark unused argument. > > diff --git a/gcc/config/msp430/msp430.cc b/gcc/config/msp430/msp430.cc > index 7a378ceac56..2909cabd3ff 100644 > --- a/gcc/config/msp430/msp430.cc > +++ b/gcc/config/msp430/msp430.cc > @@ -1460,7 +1460,7 @@ msp430_get_inner_dest_code (rtx x) > /* Calculate the cost of an MSP430 single-operand instruction, for operand DST > within the RTX OUTER_RTX, optimizing for speed if SPEED is true. */ > static int > -msp430_single_op_cost (rtx dst, bool speed, rtx outer_rtx) > +msp430_single_op_cost (rtx dst, bool speed, rtx outer_rtx ATTRIBUTE_UNUSED) You can just drop the argument identifier since we're C++ now. Or use rtx /* outer_rtx */ for documentation purposes. OK with that change. Richard. > { > enum rtx_code dst_code = GET_CODE (dst); > const struct single_op_cost *cost_p; > > > > Okay for HEAD? > > Thanks, > Jan-Benedict > > --
Hi Jan-Benedict, > gcc/ChangeLog: > * config/msp430/msp430.cc (msp430_single_op_cost): Mark unused argument. > Okay for HEAD? Patch approved - please apply. (I think that this patch would also count as an "obvious" fix, but thanks for asking anyway). Cheers Nick
diff --git a/gcc/config/msp430/msp430.cc b/gcc/config/msp430/msp430.cc index 7a378ceac56..2909cabd3ff 100644 --- a/gcc/config/msp430/msp430.cc +++ b/gcc/config/msp430/msp430.cc @@ -1460,7 +1460,7 @@ msp430_get_inner_dest_code (rtx x) /* Calculate the cost of an MSP430 single-operand instruction, for operand DST within the RTX OUTER_RTX, optimizing for speed if SPEED is true. */ static int -msp430_single_op_cost (rtx dst, bool speed, rtx outer_rtx) +msp430_single_op_cost (rtx dst, bool speed, rtx outer_rtx ATTRIBUTE_UNUSED) { enum rtx_code dst_code = GET_CODE (dst); const struct single_op_cost *cost_p;