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-1520] [Ada] Remove explicit call to Make_Unchecked_Type_Conversion Date: Wed, 6 Jul 2022 13:30:21 +0000 (GMT) [thread overview] Message-ID: <20220706133021.ABFE7385800F@sourceware.org> (raw) https://gcc.gnu.org/g:405ebd743d392d2b0afd384e0955e3922e388ca9 commit r13-1520-g405ebd743d392d2b0afd384e0955e3922e388ca9 Author: Piotr Trojanek <trojanek@adacore.com> Date: Thu Jun 9 22:01:06 2022 +0200 [Ada] Remove explicit call to Make_Unchecked_Type_Conversion Respect a comment in sinfo.ads, which says: "Unchecked type conversion nodes should be created by calling Tbuild.Unchecked_Convert_To, rather than by directly calling Nmake.Make_Unchecked_Type_Conversion." No test appears to be affected by this change, so this is just a cleanup. gcc/ada/ * exp_ch6.adb (Build_Static_Check_Helper_Call): Replace explicit call to Make_Unchecked_Type_Conversion with a call to Unchecked_Convert_To. * tbuild.adb (Unchecked_Convert_To): Fix whitespace. Diff: --- gcc/ada/exp_ch6.adb | 4 +--- gcc/ada/tbuild.adb | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index d6d9d008a55..b5764ad12e1 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -7578,9 +7578,7 @@ package body Exp_Ch6 is and then Etype (F) /= Etype (A) then Append_To (Actuals, - Make_Unchecked_Type_Conversion (Loc, - New_Occurrence_Of (Etype (F), Loc), - New_Copy_Tree (A))); + Unchecked_Convert_To (Etype (F), New_Copy_Tree (A))); else Append_To (Actuals, New_Copy_Tree (A)); end if; diff --git a/gcc/ada/tbuild.adb b/gcc/ada/tbuild.adb index 5aa9fbc8015..df13e9f80b0 100644 --- a/gcc/ada/tbuild.adb +++ b/gcc/ada/tbuild.adb @@ -882,8 +882,8 @@ package body Tbuild is -- We don't really want to allow E_Void here, but existing code passes -- it. - Loc : constant Source_Ptr := Sloc (Expr); - Result : Node_Id; + Loc : constant Source_Ptr := Sloc (Expr); + Result : Node_Id; begin -- If the expression is already of the correct type, then nothing
reply other threads:[~2022-07-06 13:30 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=20220706133021.ABFE7385800F@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).