From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 06FCD3858D28 for ; Mon, 17 Oct 2022 12:38:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 06FCD3858D28 Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id A7FA61E0D3; Mon, 17 Oct 2022 08:38:53 -0400 (EDT) Message-ID: <49211548-0894-2374-c83f-f590be7761af@simark.ca> Date: Mon, 17 Oct 2022 08:38:53 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH] gdb: silence unused-but-set-variable warning about yynerrs in cp-name-parser.y Content-Language: en-US To: Tom Tromey , Simon Marchi via Gdb-patches Cc: Simon Marchi References: <20221012173256.20079-1-simon.marchi@efficios.com> <87bkqenyec.fsf@tromey.com> From: Simon Marchi In-Reply-To: <87bkqenyec.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP 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: 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: , X-List-Received-Date: Mon, 17 Oct 2022 12:38:56 -0000 On 2022-10-14 12:49, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi via Gdb-patches writes: > > Simon> I initially fixed this by using > Simon> DIAGNOSTIC_IGNORE_UNUSED_BUT_SET_VARIABLE (like in commit f7aa1a5acc5 > Simon> ("gold: Suppress "unused" variable warning on Clang")), but then I > Simon> realized we could suppress the warning in a more fine-grained way using > Simon> this in a rule: > > Simon> (void) yynerrs; > > Seems fine to me. > > Tom Pushed, thanks. Simon