From patchwork Tue Jan 9 13:36:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 186389 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp111066dyi; Tue, 9 Jan 2024 05:37:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IG7e0Vp02RA4fu5bg57fVeE5k0XWM97xc8QSN0UjT0R+8QuPLgAinOlnPhbTGtRbFjNELFL X-Received: by 2002:a05:620a:450b:b0:783:266c:242f with SMTP id t11-20020a05620a450b00b00783266c242fmr2574140qkp.116.1704807455779; Tue, 09 Jan 2024 05:37:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704807455; cv=pass; d=google.com; s=arc-20160816; b=unI/cp5FQL1VZJLn75Ehv4VtNwIPQdWhllymzcLV0InPJwACOekZcXHYosweL18pyF VaEUUPNlwOp4wdbxVQ9pz2qPtLmwxrVUmfHzNbh0ReY8bwewLi5tzEtUui6fhiF0Jjlh paXHm/6P7AgZl6lTwRXWpbfodYAwfM1DAQYgDyv/TiNBlTMWWxr6dHXDGVVMGrBPEx+I f24ae1mrpY8w7f8wYZyL7kmcm3GSQ3ziPXtDWAziXqend06vPhAF4jEwm0NKcSpsD080 o6rQ42aKAJKflh5nCcJv3pQB1VyZexK2ZQ/Rji2jYfZ2dp2LcFlEK1b8L94S5JTQOD97 XQww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=dpVglQPsoPqMBpE0GXlBN3RZ0+lcZS/69QcCoV3JUMo=; fh=QRb7QY4BZ0mIIAPiH2G4K0PcYKRtRn2i5A6VLUA8cN4=; b=mb6EBhrB0e0pXSNmZVT6eHtkjr+cwtYSCshmb6YndRX0UiSA5ewsNAFYscRVR5kx9G R2i5f/x/duTwHlqy2e1IvEnxFBUli4JykxTS3pl/1jcxLWGipfRiTPeu1sJ4DNhhtwrf ACGhdzbIZ8pVUbJ42Rj+7dhJguH6cn0qBFImRVleWUNvTkl3WW5h0JnAxezTumbwUks3 ofksDTxAk4Fg6S/iehEZGjShCgCzJBI9Nk84nxakEee2SsmazZIk0hyPp6L9NcAf5Xhk dWiaa6VOD4hCmQ496TwnwjTaHAsuPTf26AZ8u5kMJzKsdvUYwJwNXebLzdnqfMSww1+h tywA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b=W2v1+NSZ; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id q11-20020ae9e40b000000b0077422d8fdd7si1998617qkc.235.2024.01.09.05.37.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 05:37:35 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b=W2v1+NSZ; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 733813857C79 for ; Tue, 9 Jan 2024 13:37:35 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by sourceware.org (Postfix) with ESMTPS id 3FB4C385801D for ; Tue, 9 Jan 2024 13:36:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3FB4C385801D 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 3FB4C385801D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::42b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704807416; cv=none; b=u2G4TU0n6olsOTv7sxS66pK7awT/tpixeZm5zHVaUsxvd0ENkfXOjd4ccvlRpEqT9HUnBc1rFrAyoVk/3ePcndyls/2/f6r9ZzH8H1Zk2bypLokEcdPui7HUjltwntdDB8LXUYD/fxtFKGWU3oreryx1waTrb/WH9RzSMsSPMgY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704807416; c=relaxed/simple; bh=cUXO3nYnYyjsRhxjVgOvYESEOPWfb9KCuMheLl3UnlA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Av547h5+8f+7uVNi8s9F/vXPuo+L+LNKe30tMIXPikCuRC6g4GuEpiw9jrwRM9qBBnBWknrZ4j1GnR6g18fPL4KEyJ87Hf9Elouh2chy8KFzKg/OKpMoyF3C9WPXttGAzvVLVIURPmV6u4+iyAGDaBfaCacPiGHyKIAZoVas1rQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3367632ce7bso2397279f8f.2 for ; Tue, 09 Jan 2024 05:36:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1704807413; x=1705412213; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=dpVglQPsoPqMBpE0GXlBN3RZ0+lcZS/69QcCoV3JUMo=; b=W2v1+NSZAv0UQMzN3aoFVyM1Zv50A4dDxeOboKwDdfASH9iqVoEGYCI+t5TPktImaD ygK5K+NwQxokuXqt78WgpYwTgzl+JOqMXwEIxxpb/048JcBoIKIX6lx4Ga9Z3I+Fd42h iQXeTLMa5goEj6Fk2RgGskg55l8EVJdNbUFoOUeXBhr0s6C0N5WTTmc9HSnX+Gky8c9W 4X6/0txIDySqtNe0hBcayDtgPDPGSqa0EyEqBsXGvtZ2hDtLwl8nU1JKE2Un7CUq55fa 4gCah41FIHBrPqbMAH/peSxnjJUlt8wGQS/qkxo6zZTWAdqQ8cxEfzxopPGegOKn/Qzq WokA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704807413; x=1705412213; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dpVglQPsoPqMBpE0GXlBN3RZ0+lcZS/69QcCoV3JUMo=; b=IuNV80lnSRqw9s2Ea1em+b3pZwIF9IEhYbmWy4s9j4zmaBpmgcn06o87v5K4nOXFWl XGyqgzHFyJLNfhL6WwVJgw/l6m4BKNpDWDDszDoefDxR2lICMWTHoL3yHU72lUaaIV35 gwRt5WesVzQfjKpVTI33LpGTWg6AOT25tKPw9C+jQB4vIg2M4gDvua51q1h0bGjsVgdQ bA+EbD2a6nlLvoFn7XR7peXCZvlnTVwQ/oo2hdyiUxUuk9AttY+Uyg93XtVVeBtXrMZ7 IkGoznZHDXasxVd23faWwOuQ8ZDlMzkIT78QrKpZ/QOfc95hqBb3tBBntzW69kPRHbjW GMCw== X-Gm-Message-State: AOJu0YzZ3pcdPGSy0Ex7GJ/HRb8yvRn8XnGap6JUhypPgjYRgoCqDLji NhEXDBKwfEF7yz4m5+nbwPbm+q/edS5ICGXayHPZ87vEwg== X-Received: by 2002:a5d:6d82:0:b0:337:62d3:f68a with SMTP id l2-20020a5d6d82000000b0033762d3f68amr772237wrs.81.1704807413020; Tue, 09 Jan 2024 05:36:53 -0800 (PST) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id a1-20020adfed01000000b0033677a4e0d6sm2435545wro.13.2024.01.09.05.36.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 05:36:52 -0800 (PST) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [COMMITTED] ada: Document new SPARK aspect and pragma Always_Terminates Date: Tue, 9 Jan 2024 14:36:21 +0100 Message-ID: <20240109133640.752216-1-poulhies@adacore.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.7 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, T_SCC_BODY_TEXT_LINE 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787620183157754208 X-GMAIL-MSGID: 1787620183157754208 From: Piotr Trojanek Add description of a recently added SPARK contract. gcc/ada/ * doc/gnat_rm/implementation_defined_aspects.rst, doc/gnat_rm/implementation_defined_pragmas.rst: Add sections for Always_Terminates. * gnat-style.texi: Regenerate. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate. --- .../doc/gnat_rm/implementation_defined_aspects.rst | 6 ++++++ .../doc/gnat_rm/implementation_defined_pragmas.rst | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_aspects.rst b/gcc/ada/doc/gnat_rm/implementation_defined_aspects.rst index 3d90ad5b210..d58119b5fbc 100644 --- a/gcc/ada/doc/gnat_rm/implementation_defined_aspects.rst +++ b/gcc/ada/doc/gnat_rm/implementation_defined_aspects.rst @@ -66,6 +66,12 @@ Aspect Abstract_State This aspect is equivalent to :ref:`pragma Abstract_State`. +Aspect Always_Terminates +======================== +.. index:: Always_Terminates + +This boolean aspect is equivalent to :ref:`pragma Always_Terminates`. + Aspect Annotate =============== diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst index bfaa1cff407..9fc334354ac 100644 --- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst +++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst @@ -329,6 +329,20 @@ this pragma serves no purpose but is ignored rather than rejected to allow common sets of sources to be used in the two situations. +.. _Pragma-Always_Terminates: + +Pragma Always_Terminates +======================== + +Syntax: + +.. code-block:: ada + + pragma Always_Terminates [ (boolean_EXPRESSION) ]; + +For the semantics of this pragma, see the entry for aspect ``Always_Terminates`` +in the SPARK 2014 Reference Manual, section 7.1.2. + .. _Pragma-Annotate: Pragma Annotate