From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id I3JpE32XAGur8CQAWB0awg (envelope-from ) for ; Fri, 20 Nov 2026 13:54:53 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=CkSndRaA; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 3C6AE1E023; Fri, 20 Nov 2026 13:54:53 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 6AB101E023 for ; Fri, 20 Nov 2026 13:54:51 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3B82340ABD55 for ; Fri, 20 Nov 2026 18:54:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B82340ABD55 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=CkSndRaA Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 6A63A4163A7C for ; Fri, 20 Nov 2026 18:54:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6A63A4163A7C Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6A63A4163A7C Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1795200863; cv=none; b=oXvMKjFgqHK3adb5DUgBY6Ahr0YtKoaLfkoAufDnweepQBSXFaH/St48IitG6+9Ty4C2y4BsTsHr0JnBg5pZ8fpvSZgovst+VjcxSStnllaBC0+20+tyKvNW07MWxIlmAf6moK5Su1G5sKCP9o/r1bwB6qMAgphiaheXzy3q+iE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1795200863; c=relaxed/simple; bh=BNI99E2AM1nwpzmVD+oxyzGl1ewfJOR/SO5CA5dNGhc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=PrOkSzxXaBtpxnr/jdDyDeaxSgeAF5XpuAl3SaFrzGEc6Arj+6d/L9w0G/Snu32oUE7iXejnhQkQFTRPT4dba9I5Rd8csHUw2BF8+Bg/dieQAmtNwPrQ65Hm1KeUdRyL2x7hW4uuhFDi+xw6pO9QXJ0EhCBrN1r6bGZsFfUQV9A= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=CkSndRaA DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6A63A4163A7C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1795200863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=N9C4kWRDsNgwunt6q9GiGKl6q8PSEZ/RqinLj88ksIQ=; b=CkSndRaAhBLWburuuGs3VSDUmXwPkHhgovveTvi9555gJ8eMpWGH/grFggeEqNy98CtS10 jCWmGseh4lHUqknMJA/aHj0ZeKvZFpFXngPgq74cVT0IKQpjKJtD/XyKpZYhzyGeY++4Oc LksnZXXudz+wQkeFqNRkw0HV7IU7ipE= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-474-PFdtYPH0OsiJ-rX9XLdLgA-1; Fri, 20 Nov 2026 18:54:21 +0000 X-MC-Unique: PFdtYPH0OsiJ-rX9XLdLgA-1 X-Mimecast-MFC-AGG-ID: PFdtYPH0OsiJ-rX9XLdLgA_1795200860 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-4a3705ea6ccso699256f8f.2 for ; Fri, 20 Nov 2026 10:54:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795200860; x=1795805660; h=content-type:mime-version:message-id:date:references:in-reply-to :subject:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=N9C4kWRDsNgwunt6q9GiGKl6q8PSEZ/RqinLj88ksIQ=; b=O9tZaowwjAnluBd4Wr2KInbS/4vxYud0qQQgvVMBiLRYGFC/TIa1OtOl2lVDCnJyfo +6Z1ryOq7pxb3LiHDAOkDzodZoubMizaJTL7hb/+VKL4OsA8NFQfdrkJ0oCkcSn0O1/o /mzri14q63PiIhuylMFgwlzT4eZrkmBSaCHAABHx7vqNnliA4bUHSu5ta3AR9Q5GjyAu calZROtLTkVFU0qzgOOn0cLvmkrtXzVR1f+P4KH2ZuHA6rvTYUdQp4VGqqOHtVOHZ3hS iMtzTDfUOlWA2koRTeh32oOViqqG5KmK26VjrJFw6va8olhPUbGwXeAboFsMuLjSHV0W uqWw== X-Forwarded-Encrypted: i=1; AL+hErEEUFFl7QhbIR3MNkdgQaA4i8sDcJ8ZDql56aOnQHtQHJP4NYDCPgvjpNKBUwR+4Pdfizvg8Iw91CRe1w==@sourceware.org X-Gm-Message-State: APuU4Z+P+bgQVLAKHshmnxMq0hm9q56WfuBU9gkVPycNZXxcaWBnYONH +cCk3GElB1jEa+6smNdw+nO107fO7abqWMVlvllKwrlQ/WmcngKZ79F2ECpHQ5eEVBf0x8fKerL g64nVW59l2dNHFScnn5oXgDFdcKfV9E59AUeOJmXCSHHvOWcPI6yBE4ghXtJ/ZvQ= X-Gm-Gg: AYBFou3Tsr4cqP7pyrIDcxjPDRaIbfUB4lt0K4UN3xJwzUojVmR01YZRXaNEv22Xus3 IPr7EvhvaUKgXaKW3Dyb/UFFKi4PpHzZVze8NxEwdJihDJm66aitBgLhHoZd3f2OFTYmryDH65h TkKxFQ4KUV8I5t7ZKTxD3jDpVPbcEJ44pddedMmcl4LUMVBf2luPaI7/+2R6jEQd0bwPW66KbiC Cxd2F9viQMEE1Ne33XYjAp4XZRFGV/7YPbXT3+PLTJmvQtHejP1b7U9eYdIHGINUDHCGLHzgsz9 DblLoHHKkyTz9F0K9aSHCAkVVntqY5mmcbo81C+rdI+yfGzyaaZoB/dFfG0M4YbgCzWZ444PAfL RqSdd1SzpjNltUKOhAkY5QvXy/UmNCOb0XWgIbZPlbNGcSg== X-Received: by 2002:a05:600c:3b83:b0:4b7:6b96:e431 with SMTP id 5b1f17b1804b1-4bb88822242mr100322245e9.28.1795200860048; Fri, 20 Nov 2026 10:54:20 -0800 (PST) X-Received: by 2002:a05:600c:3b83:b0:4b7:6b96:e431 with SMTP id 5b1f17b1804b1-4bb88822242mr100321935e9.28.1795200859650; Fri, 20 Nov 2026 10:54:19 -0800 (PST) Received: from localhost ([83.216.138.189]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884c3063sm111510825e9.15.2026.11.20.10.54.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2026 10:54:19 -0800 (PST) From: Andrew Burgess To: Tom de Vries , gdb-patches@sourceware.org Subject: Re: [PATCH] [gdb, gdb-18-branch] Ignore Wunused-function in gdb/ada-lex.l In-Reply-To: <20261120102232.894725-1-tdevries@suse.de> References: <20261120102232.894725-1-tdevries@suse.de> Date: Fri, 20 Nov 2026 18:54:17 +0000 Message-ID: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: OqzGTtmkgUGjkeJpBbbGemEM9tPcxocj5VvSVzDw5Zo_1795200860 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Tom de Vries writes: > [ This patch is for the gdb-18-branch. On trunk, commit 8b68f316801 ("Rewrite > the Ada lexer") removes gdb/ada-lex.l, which also solves PR build/35015. ] > > In gdb/ada-lex.l, we have the following workaround: > ... > /* Dummy definition to suppress warnings about unused static definitions. */ > typedef void (*dummy_function) (); > dummy_function ada_flex_use[] = > { > (dummy_function) yyunput > }; > ... > > This stopped working for a range of flex versions (2.6.5 - 2.6.11) which > define yyunput as a macro: > ... > #define yyunput(c) yyunput_r(...) > ... > > [ Version 2.6.12 restores the previous situation using commit 160a160 > ("fix(skel): restore the flex 2.6.4 yyunput function"). ] > > I ran into this on cygwin using 2.6.11. > > We can fix this using: > ... > #ifdef yyunput > (dummy_function) yyunput_r > #else > (dummy_function) yyunput > #endif > ... > but that seems fragile. > > We could use "%option nounput". It was added in 2.5.1, but with some bug that > was fixed in 2.5.2. For gdb-18-branch, we (de facto) require >= 2.5.1, and > using "%option nounput" would break support for 2.5.1. > > We could use YY_NO_YYUNPUT (available starting 2.6.5) to suppress the > generation of yyunput, while falling back to ada_flex_use for < 2.6.5. > A patch was submitted using this approach [1]. > > Instead, fix this using a simpler approach: drop ada_flex_use, and ignore the > resulting warning. If this is only for gdb-18-branch and not for master, then I think this is fine. Approved-By: Andrew Burgess Thanks, Andrew