public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Marc Poulhi?s <dkm@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3725] ada: Put_Image aspect spec incorrectly not inherited Date: Mon, 7 Nov 2022 08:38:36 +0000 (GMT) [thread overview] Message-ID: <20221107083836.DF2A23858C78@sourceware.org> (raw) https://gcc.gnu.org/g:748976cfc867cb387f0f8180c48233e883223f93 commit r13-3725-g748976cfc867cb387f0f8180c48233e883223f93 Author: Steve Baird <baird@adacore.com> Date: Tue Oct 11 15:21:39 2022 -0700 ada: Put_Image aspect spec incorrectly not inherited In some cases, a Put_Image aspect specification for a scalar type was not correctly inherited by a descendant of that type. gcc/ada/ * exp_put_image.adb (Image_Should_Call_Put_Image): Correctly handle the case of an inherited Put_Image aspect specification for a scalar type. Diff: --- gcc/ada/exp_put_image.adb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/ada/exp_put_image.adb b/gcc/ada/exp_put_image.adb index 50e0569a801..c489ad41fd1 100644 --- a/gcc/ada/exp_put_image.adb +++ b/gcc/ada/exp_put_image.adb @@ -1039,13 +1039,13 @@ package body Exp_Put_Image is end if; -- In Ada 2022, T'Image calls T'Put_Image if there is an explicit - -- aspect_specification for Put_Image, or if U_Type'Image is illegal - -- in pre-2022 versions of Ada. + -- (or inherited) aspect_specification for Put_Image, or if + -- U_Type'Image is illegal in pre-2022 versions of Ada. declare U_Type : constant Entity_Id := Underlying_Type (Entity (Prefix (N))); begin - if Present (TSS (U_Type, TSS_Put_Image)) then + if Present (Find_Aspect (U_Type, Aspect_Put_Image)) then return True; end if;
reply other threads:[~2022-11-07 8:38 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=20221107083836.DF2A23858C78@sourceware.org \ --to=dkm@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).