From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id uEGVOR0PlWiIXwYAWB0awg (envelope-from ) for ; Thu, 07 Aug 2025 16:39:57 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=jIvYz/rm; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id E88ED1E100; Thu, 7 Aug 2025 16:39:57 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE autolearn=unavailable autolearn_force=no version=4.0.1 Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 427F61E091 for ; Thu, 7 Aug 2025 16:39:57 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D15513858D29 for ; Thu, 7 Aug 2025 20:39:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D15513858D29 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=jIvYz/rm Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) by sourceware.org (Postfix) with ESMTPS id 76EC03858D29 for ; Thu, 7 Aug 2025 20:39:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 76EC03858D29 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 76EC03858D29 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::12a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1754599166; cv=none; b=pvvENfGIE9EaaL3W/fxW03jIILisoJcgYwrHRECxldLR0Qy4SzSKnVybNH8dkfRXtkN49zTsxd/+UPoTG9hvbf9Zd6KTEljMbVb1YE+KKJuB/9Md8anaZ7KE9+wW9zOJr1g/gb3T4obJRiIJBjWQBgN0FSb4e1TECs4scG91LZw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1754599166; c=relaxed/simple; bh=IGVZqJZTIeHfJlfarZuJ8sPR8nLVieJ250EQKyblsFA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=TscE9dPKFVORdKZD6rgy4iFie7r+yjvrQ+A4TYykRV14QEshRQy45SqaRIPa7IAUQbRo49h8efbH+0c0aSSheSOR66rAMhL8Tb/xIcIECAv10TioOZoTCUL8/mXzgtCcSipWnU+O034zQ8y2R18HDVrxJnlgOv3upKjFQDxUtCs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 76EC03858D29 Received: by mail-il1-x12a.google.com with SMTP id e9e14a558f8ab-3e5268129b7so11795845ab.2 for ; Thu, 07 Aug 2025 13:39:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1754599166; x=1755203966; darn=sourceware.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=K4z9O3jyTPOptg5/D3PTuM/T95lqOIbXcNJpIN7lh+w=; b=jIvYz/rmuteK9Qz9QV2I6qouyfIv+KLKymspwfHWQd5dUczic7kMdB/py86/PutYNm 90J5OSusI32tx0ffKHsNq4kHtusofPZ7YCpyNbDSt0GGFg5Mo+q6yYOHQXnUH9dJ6s87 CI4zl6rVr/NT7HO4M4eWPniR84VYGJAs88vFNMcA7phY84oG+EBzllCUUTh59nrDdBrW VcDdulO3MH0jB5v/vuR4s823WchvcmbLNX3wSdoltN8/bMwTMkO9lVpPXgSlsazNXize opLAF580nlTOXMKu0ju0B7REOawOS+vGscdXmf5jTYjWNMwpWrKJ6snhv1LPc1sb1LDB zztw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754599166; x=1755203966; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=K4z9O3jyTPOptg5/D3PTuM/T95lqOIbXcNJpIN7lh+w=; b=JLYkDdREyKxFkB3h0rPNaZw2+05uvcLivfZ7ToYuoN0ff4+R3oTaJNFOLE38gTdspN xfezo/mmkZeEmoROM+vhYOD4/e7mxvk95aTZ4BQWBEcciLghLkWAnRakwdDOl6SNH/RM qsd98QGRNcPEzY77yUFrbxI4TQQLYAKaJR3S8EpFCCAH4ACsjvh4bjBRrEo0Ixx6NKxX YUybWnTeiasMK37ms85NlqbEoPFeMDqh6d76qj1zvbCJ9e3IuMs3xwHlzaAdlTcrj51V PPBmpwZQDiupBXaQdHbxhyW1pjagzP9dDA59kiEajLkJmHxsTsl/iHVyEkqkGKNxPNKS xubw== X-Forwarded-Encrypted: i=1; AJvYcCUScO8RnGUGSBw5uY6QJ6uJUFlh8EUkb+EOltvnDE2fgyrqCwsAq1F3L0DierlmYjxBN6+x5013pYl3Cg==@sourceware.org X-Gm-Message-State: AOJu0YzMgCoeMSDOs8BpQKigo41TCl8APwn1lCuDlbqP+R7iZZd7W+mq s1t0pmeKVZkU4tnukePZZFy/b8YSlmGQOmi0Kc3LZsMb47XDeeqYkqZPC6Fud4cH3A== X-Gm-Gg: ASbGncvY2auBLWwtcYQ074UIgNIRmzz6t5aFQxky66wKuW+/YV6ZCfszWDs4HLj+1i6 ocsokurJLvISZktC1+YbDKM5QnptHR3W2hOLHmDEuQj0oUeiIoErnJw2I2DvQjQWQhe8up9FS+R djV65edIsx/c63bcCFascg93hTLaP+q6f3cLpHGj84VfEeGeKjfr84IevJRmBEQTU40dB1Nh+l3 lpGNH6Mq09+paFRH4KcCdA8+nXKBSXHjfggfEUo0g8BZC+1Az6K+JRr6wHy2HYwT+6A7zH/X9Ek boIzlIKgocx4uyo3aSlPAy12bPpbKZBMVn20Lg5voa3wSeDHRJuqo1RMLFRIlUOtGZExHqkV/oO lmujzSBzaSx65kHNNVw91+cXi9tmUCo3DHhj1KaDGwg== X-Google-Smtp-Source: AGHT+IHvIjJ3CQINJgNFgaJ7jufafei0IqjuNFbuv51MrEZDPE3Rw6Wa7gecx/7QNN62IeuRR8myIA== X-Received: by 2002:a05:6e02:178f:b0:3e5:1917:585b with SMTP id e9e14a558f8ab-3e533145e65mr9578315ab.14.1754599165687; Thu, 07 Aug 2025 13:39:25 -0700 (PDT) Received: from bapiya (97-122-110-68.hlrn.qwest.net. [97.122.110.68]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3e533c0f59fsm474845ab.21.2025.08.07.13.39.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Aug 2025 13:39:25 -0700 (PDT) From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH 0/3] Use gnulib c-ctype module, not In-Reply-To: (Simon Marchi's message of "Wed, 6 Aug 2025 15:46:45 -0400") References: <20250806-gnulib-c-ctype-v1-0-10f33e9f22a4@adacore.com> X-Attribution: Tom Date: Thu, 07 Aug 2025 14:39:24 -0600 Message-ID: <87h5yiq32b.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 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 >>>>> "Simon" == Simon Marchi writes: Simon> My understanding is that poisoning using macros doesn't work, because it Simon> interferes with identifiers of the same name in other headers. But Simon> would it be possible to do it using "#pragma GCC poison"? Like: I didn't try it but that's because I believe it won't work. The pragma is better than the preprocessor approach, the manual says: If a poisoned identifier appears as part of the expansion of a macro which was defined before the identifier was poisoned, it will _not_ cause an error. This lets you poison an identifier without worrying about system headers defining macros that use it. However in our case the poisoning would likely occur before the inclusion of the offending header. The workaround would be to include the locale (and maybe iostream?) headers everywhere, but I think we definitely should not do that. FTR the failure I saw (with cpp-style poisoning, a la safe-ctype.h) came from source-cache.c which includes some locale stuff via . The main issue here is that the pragma works on an identifier basis but really we'd like to be more selective and only exclude some particular functions. Tom