From: Anh Vo <anhvofrcaus@gmail.com>
Subject: In mode parameter in an assignment statement
Date: Fri, 12 Oct 2018 17:48:04 -0700 (PDT)
Date: 2018-10-12T17:48:04-07:00 [thread overview]
Message-ID: <82fdea5d-b9b6-4f1e-a45f-ee0ff9f55946@googlegroups.com> (raw)
-- ...
------------------
-- Compute_Data --
------------------
procedure Compute_Data (Region : Mapped_Region) is
Data_Shift : constant Storage_Offset :=
Storage_Offset (Region.User_Offset - Region.System_Offset);
begin
if Region.User_Size = 0 then
Region.Data := Empty_String'Address;
elsif Region.Mapped then
Region.Data := Region.Mapping.Address + Data_Shift;
else
Region.Data := Region.Buffer.all'Address + Data_Shift;
end if;
end Compute_Data;
end GNATCOLL.Mmap;
The above code is the tail end of package gnatcoll-mmap.adb.
I thought it should be rejected during compilation because in mode parameter is not allowed in an assignment statement. But, it was compiled successfully under GNAT obviously.
What did I miss? Thanks in advance.
Anh Vo
next reply other threads:[~2018-10-13 0:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-13 0:48 Anh Vo [this message]
2018-10-13 5:52 ` In mode parameter in an assignment statement Jacob Sparre Andersen
2018-10-13 6:03 ` Per Sandberg
2018-10-13 8:38 ` Jeffrey R. Carter
2018-10-15 16:05 ` Anh Vo
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox