| Message ID | orplbvvu83.fsf@lxoliva.fsfla.org |
|---|---|
| State | Committed |
| Commit | 770cbd759d2dda74231349502d7283b04c0fd0df |
| Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 880EF3857C7A for <patchwork@sourceware.org>; Sat, 13 Sep 2025 04:43:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 880EF3857C7A 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=FfecVMy/ X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 05DD73858D21 for <gcc-patches@gcc.gnu.org>; Sat, 13 Sep 2025 04:42:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 05DD73858D21 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 05DD73858D21 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::630 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757738569; cv=none; b=Hq7DOFHf9CLA7wrw9KfrgCX9EcZtuTppy/Vw29u46WYzkOpn4SSx0iZNVCecd4nfu94snIjSfyfFQ0atisZLywtxiwyVVFnFQPbxtF83/9d5oW0NLwnr2r4ca281PirYSeTK788l0D9ga6Y07atFHRa6rK+4VmoihONSXO8o+mE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757738569; c=relaxed/simple; bh=7nyLCZE4Er3cbDu43Z5V3Lzz/3I80993FDQLz3QE1Ug=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=TOmGP57eFXjUzpOegxQfKLIYjvxMmdjLg80hFC3PTFvUzu5lQkXdgNwGZulp7qUC+CSnVgfOe5BZniYjXt4L+eE6HdM+dw2rS9g1Ij/h3fCSQliA5yIg3npTjK/onAUJsCJ9bUD6FeA17tT8F2lOtU4b/Q+IJ4LA3lHQE9gZCdE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 05DD73858D21 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-251ace3e7caso33158065ad.2 for <gcc-patches@gcc.gnu.org>; Fri, 12 Sep 2025 21:42:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1757738568; x=1758343368; darn=gcc.gnu.org; h=mime-version:user-agent:message-id:date:organization:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=VPCO0pddaivLVSxO3ZEcZvRn+cQ9na4VH+RDOYfX+fo=; b=FfecVMy/njr+rLXeNtED35MiWT3A18qOwnAo/kK/+wjanWxn8CZTS4KDHvRL2YFrE4 6Vo6mIvYhYxi0KtoVLlLulSABQ/DMGAPE84iPkKzr7f0DXnNgTOawo7s/rDEh9PrDOxh XMIwZXT0LN4CT8VDNAnJIMnrEuAZlg32bgrUW1xzfwdpArJJfNRFMzxz0ROhc5l0F/Cq VJeY4V1aK0wYYocVvSH1JM5Fozn4QsnSmtbdj/BI667quCNXXtMEYFx87wmyJUPklJ5l INa3r8ttv4oUlNrQONZySS5SuemIBtu7IVQUm7CY7hFOca1MsdJYEfkaXf8QAeBodbEL 5EoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757738568; x=1758343368; h=mime-version:user-agent:message-id:date:organization:subject:cc:to :from:x-gm-message-state:from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25c:d4b6:f119 with SMTP id d9443c01a7336-25d245db32emr65639495ad.12.1757738568070; Fri, 12 Sep 2025 21:42:48 -0700 (PDT) Received: from free.home ([2804:14c:4d1:41a6::2000]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-25d49093074sm40207535ad.149.2025.09.12.21.42.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Sep 2025 21:42:47 -0700 (PDT) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 58D4gaHC2080167 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sat, 13 Sep 2025 01:42:36 -0300 From: Alexandre Oliva <oliva@adacore.com> To: gcc-patches@gcc.gnu.org Cc: David Malcolm <dmalcolm@redhat.com> Subject: [PATCH] [analyzer] another function name that returns a pointer to errno Organization: Free thinker, does not speak for AdaCore Date: Sat, 13 Sep 2025 01:42:36 -0300 Message-ID: <orplbvvu83.fsf@lxoliva.fsfla.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, WEIRD_QUOTING 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.30 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> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
| Series |
[analyzer] another function name that returns a pointer to errno
|
|
Commit Message
Alexandre Oliva
Sept. 13, 2025, 4:42 a.m. UTC
Add __get_errno_ptr() as yet another synonym for __errno_location. This came up while updating a port for a target that uses this function name in the implementation of errno. Tested on that target, and on x86_64-linux-gnu and aarch64-linux-gnu natives. Ok to install? for gcc/analyzer/ChangeLog * kf.cc (register_known_functions): Add __get_errno_ptr. --- gcc/analyzer/kf.cc | 1 + 1 file changed, 1 insertion(+)
Comments
On Sat, 2025-09-13 at 01:42 -0300, Alexandre Oliva wrote: > > Add __get_errno_ptr() as yet another synonym for __errno_location. > > This came up while updating a port for a target that uses this > function > name in the implementation of errno. Tested on that target, and on > x86_64-linux-gnu and aarch64-linux-gnu natives. Ok to install? > LGTM; thanks! Dave > for gcc/analyzer/ChangeLog > > * kf.cc (register_known_functions): Add __get_errno_ptr. > --- > gcc/analyzer/kf.cc | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/gcc/analyzer/kf.cc b/gcc/analyzer/kf.cc > index 2a7c357031533..5c54b55644869 100644 > --- a/gcc/analyzer/kf.cc > +++ b/gcc/analyzer/kf.cc > @@ -2373,6 +2373,7 @@ register_known_functions > (known_function_manager &kfm, > kfm.add ("___errno", std::make_unique<kf_errno_location> ()); > kfm.add ("__error", std::make_unique<kf_errno_location> ()); > kfm.add ("__errno", std::make_unique<kf_errno_location> ()); > + kfm.add ("__get_errno_ptr", std::make_unique<kf_errno_location> > ()); > } > > /* Language-specific support functions. */ >
diff --git a/gcc/analyzer/kf.cc b/gcc/analyzer/kf.cc index 2a7c357031533..5c54b55644869 100644 --- a/gcc/analyzer/kf.cc +++ b/gcc/analyzer/kf.cc @@ -2373,6 +2373,7 @@ register_known_functions (known_function_manager &kfm, kfm.add ("___errno", std::make_unique<kf_errno_location> ()); kfm.add ("__error", std::make_unique<kf_errno_location> ()); kfm.add ("__errno", std::make_unique<kf_errno_location> ()); + kfm.add ("__get_errno_ptr", std::make_unique<kf_errno_location> ()); } /* Language-specific support functions. */