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-838] [Ada] Fix illegal Ada in s-dwalin.adb Date: Mon, 30 May 2022 08:30:57 +0000 (GMT) [thread overview] Message-ID: <20220530083057.C04ED3815FF2@sourceware.org> (raw) https://gcc.gnu.org/g:f55e8fd165c1ed1e1c12def08ddb5f4fc55dafbb commit r13-838-gf55e8fd165c1ed1e1c12def08ddb5f4fc55dafbb Author: Romain Beguet <beguet@adacore.com> Date: Mon Apr 25 15:57:25 2022 +0200 [Ada] Fix illegal Ada in s-dwalin.adb Both the `System.Mmap` and `System.Object_Reader` packages are defining entities named `Offset` and they are both `use`d at the top of s-dwalin.adb. Therefore, the references to `Offset` throughout this file are ambiguous, and GNAT is supposed to complain. Since it does not for the moment, we fix the ambiguity by declaring a subtype `Offset` at the top of the file simply renames `System.Object_Reader.Offset`. gcc/ada/ * libgnat/s-dwalin.adb: Add a subtype declaration to fix the ambiguity. Diff: --- gcc/ada/libgnat/s-dwalin.adb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/ada/libgnat/s-dwalin.adb b/gcc/ada/libgnat/s-dwalin.adb index 5a0a2f6bf72..e1e55f31a8a 100644 --- a/gcc/ada/libgnat/s-dwalin.adb +++ b/gcc/ada/libgnat/s-dwalin.adb @@ -44,6 +44,8 @@ with System.Storage_Elements; use System.Storage_Elements; package body System.Dwarf_Lines is + subtype Offset is Object_Reader.Offset; + function Get_Load_Displacement (C : Dwarf_Context) return Storage_Offset; -- Return the displacement between the load address present in the binary -- and the run-time address at which it is loaded (i.e. non-zero for PIE).
reply other threads:[~2022-05-30 8: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=20220530083057.C04ED3815FF2@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).