public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-474] [Ada] Clarify code for detecting volatile refinement properties Date: Mon, 16 May 2022 08:42:51 +0000 (GMT) [thread overview] Message-ID: <20220516084251.0F3953857C71@sourceware.org> (raw) https://gcc.gnu.org/g:457fb3369aec1e9d681853bcd33d77bb8da2f8ea commit r13-474-g457fb3369aec1e9d681853bcd33d77bb8da2f8ea Author: Piotr Trojanek <trojanek@adacore.com> Date: Mon Mar 7 14:07:15 2022 +0100 [Ada] Clarify code for detecting volatile refinement properties Routine Type_Or_Variable_Has_Enabled_Property handles either types or objects; replace negation with an explicit positive condition. Cleanup related to handling of volatile refinement aspects in SPARK; behaviour is unaffected. gcc/ada/ * sem_util.adb (Type_Or_Variable_Has_Enabled_Property): Clarify. Diff: --- gcc/ada/sem_util.adb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index d53c4356976..6cf3c70c8d9 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -12696,10 +12696,10 @@ package body Sem_Util is return Type_Or_Variable_Has_Enabled_Property (First_Subtype (Etype (Base_Type (Item_Id)))); - -- If not specified explicitly for an object and the type + -- If not specified explicitly for an object and its type -- is effectively volatile, then take result from the type. - elsif not Is_Type (Item_Id) + elsif Is_Object (Item_Id) and then Is_Effectively_Volatile (Etype (Item_Id)) then return Has_Enabled_Property (Etype (Item_Id), Property);
reply other threads:[~2022-05-16 8:42 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220516084251.0F3953857C71@sourceware.org \ --to=pmderodat@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).