* [Ada] Fix illegal Ada in s-dwalin.adb
@ 2022-05-30 8:32 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-05-30 8:32 UTC (permalink / raw)
To: gcc-patches; +Cc: Romain Beguet
[-- Attachment #1: Type: text/plain, Size: 549 bytes --]
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`.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-dwalin.adb: Add a subtype declaration to fix the
ambiguity.
[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 546 bytes --]
diff --git a/gcc/ada/libgnat/s-dwalin.adb b/gcc/ada/libgnat/s-dwalin.adb
--- 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).
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-30 8:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-30 8:32 [Ada] Fix illegal Ada in s-dwalin.adb Pierre-Marie de Rodat
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).