From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by sourceware.org (Postfix) with ESMTPS id 4C622385840B for ; Tue, 5 Oct 2021 15:06:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4C622385840B Received: by mail-qk1-x72e.google.com with SMTP id 138so1804368qko.10 for ; Tue, 05 Oct 2021 08:06:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=WhpLCA6e66BqYZwIrqiuigEX0vN4xQVd0oqjrxXeRUE=; b=1/2EcoWgvIZGwEpSO8dSu8qgn8jFIi/kI5V8Z3c01ncyBUhMfvayvoEHXotqMguDY/ ldgG9FnI6XfuQfzKz1q7bUh7iANKXlJKytyd7P0d2omDABuyD1SHhWvEQ6bdmITa1kLM NZC/2Zyg9+CBNSOC1A1pcqJSUPo7/Pqoc8WA89lsfm5CLh0d7UuibsRGgO/D2tSpn4/C UHHeokGEhaeHNokNScZ8FCs7nJpUaRZUL+f+6ueOQqXGJ00FAOFkkBsQvKVpWp9gs5k5 WxuNqV7RAkSyYsBSnwWAWjQMQTcRfqNbRChhnCYReh5Gx4epGHzPR9i0zxRrMcXySgj4 GdMw== X-Gm-Message-State: AOAM533fT9jmm7fZs4ezJfmeAoTdnHJ1bqwmuO1s7+v8Jj69IQmoKAEI hrl4AWs1TuNBzjcWx8gElpuzpFFNXTc= X-Google-Smtp-Source: ABdhPJwBv1yQmDV7JYH8HSsb3Yv2nsbSZSzJPyEfznPivPMtTByONKkt3LDIJuO4/qFFuUeoThVuuw== X-Received: by 2002:a37:9647:: with SMTP id y68mr15395797qkd.376.1633446367685; Tue, 05 Oct 2021 08:06:07 -0700 (PDT) Received: from [172.31.0.175] (c-98-202-48-222.hsd1.ut.comcast.net. [98.202.48.222]) by smtp.gmail.com with ESMTPSA id e17sm11266400qty.28.2021.10.05.08.06.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Oct 2021 08:06:07 -0700 (PDT) Subject: Re: PING: [AVR] Fix unused argument warning To: Jan-Benedict Glaw Cc: Denis Chertykov , gcc-patches@gcc.gnu.org References: <20210930192723.hbh2nemcsm55bxig@lug-owl.de> <20211005144613.vzmpjn4d2yszhfrk@lug-owl.de> <20211005150314.vlta6filnn4y67dx@lug-owl.de> From: Jeff Law Message-ID: <65a4b4df-1e7e-84d3-18df-8155fff91421@gmail.com> Date: Tue, 5 Oct 2021 09:06:06 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20211005150314.vlta6filnn4y67dx@lug-owl.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Oct 2021 15:06:09 -0000 On 10/5/2021 9:03 AM, Jan-Benedict Glaw wrote: > Hi Jeff, > > On Tue, 2021-10-05 08:53:00 -0600, Jeff Law wrote: >> On 10/5/2021 8:46 AM, Jan-Benedict Glaw wrote: >>> On Thu, 2021-09-30 21:27:23 +0200, Jan-Benedict Glaw wrote: >>>> gcc/ChangeLog: >>>> >>>> * common/config/avr/avr-common.c (avr_handle_option): Mark >>>> argument as ATTRIBUTE_UNUSED. >>>> >>>> diff --git a/gcc/common/config/avr/avr-common.c b/gcc/common/config/avr/avr-common.c >>>> index 6486659d27c..a6939ad03d3 100644 >>>> --- a/gcc/common/config/avr/avr-common.c >>>> +++ b/gcc/common/config/avr/avr-common.c >>>> @@ -77,7 +77,8 @@ static const struct default_options avr_option_optimization_table[] = >>>> static bool >>>> avr_handle_option (struct gcc_options *opts, struct gcc_options*, >>>> - const struct cl_decoded_option *decoded, location_t loc) >>>> + const struct cl_decoded_option *decoded, >>>> + location_t loc ATTRIBUTE_UNUSED) >>>> { >>>> int value = decoded->value; >>>> >>>> >>>> Ok for trunk? >>> Wanted to give this a ping. >> I thought I sent a reply a few days ago.  Instead of using ATTRIBUTE_UNUSED, >> just drop the parameter's name.  You should consider that pre-approved for >> this and any other cases you run into. > Not quite I think. The `loc`ation parameter is used under some > circumstances, though it's dependant on some #ifdefs: Sigh.  We rooted out most of those kinds of conditional compilation from the core compiler years ago for precisely these kinds of reasons.  Go ahead with the ATTRIBUTE_UNUSED in this case.  But generally dropping the argument's name is better.  Extra points if you killed the conditional compilation in the avr backend, but I don't think that should be a requirement to move forward. Jeff