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 r12-6247] [Ada] Simplify calls to Name_Find with known string parameter Date: Wed, 5 Jan 2022 11:35:19 +0000 (GMT) [thread overview] Message-ID: <20220105113519.739D3385843B@sourceware.org> (raw) https://gcc.gnu.org/g:ad2fd234e7087b2a7bb7e3554736663d3ea5d6be commit r12-6247-gad2fd234e7087b2a7bb7e3554736663d3ea5d6be Author: Piotr Trojanek <trojanek@adacore.com> Date: Wed Dec 1 16:54:43 2021 +0100 [Ada] Simplify calls to Name_Find with known string parameter gcc/ada/ * gnatls.adb (Gnatls): Use Name_Find function. * targparm.adb (Get_Target_Parameters): Likewise. Diff: --- gcc/ada/gnatls.adb | 5 +---- gcc/ada/targparm.adb | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/gcc/ada/gnatls.adb b/gcc/ada/gnatls.adb index b20cda4fdd6..4c69b727aaf 100644 --- a/gcc/ada/gnatls.adb +++ b/gcc/ada/gnatls.adb @@ -2092,10 +2092,7 @@ begin Hi : Source_Ptr; begin - Name_Buffer (1 .. 10) := "system.ads"; - Name_Len := 10; - - Read_Source_File (Name_Find, 0, Hi, Text, FD); + Read_Source_File (Name_Find ("system.ads"), 0, Hi, Text, FD); if Null_Source_Buffer_Ptr (Text) then No_Runtime := True; diff --git a/gcc/ada/targparm.adb b/gcc/ada/targparm.adb index ade05c25795..d5755e1ee08 100644 --- a/gcc/ada/targparm.adb +++ b/gcc/ada/targparm.adb @@ -157,10 +157,7 @@ package body Targparm is return; end if; - Name_Buffer (1 .. 10) := "system.ads"; - Name_Len := 10; - - Read_Source_File (Name_Find, 0, Hi, Text, FD); + Read_Source_File (Name_Find ("system.ads"), 0, Hi, Text, FD); if Null_Source_Buffer_Ptr (Text) then Write_Line ("fatal error, run-time library not installed correctly");
reply other threads:[~2022-01-05 11:35 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=20220105113519.739D3385843B@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).