comp.lang.ada
 help / color / mirror / Atom feed
From: Rob Pettit <pettit@software.org>
Subject: GNAT 3.03  and Address Clauses
Date: 1996/04/29
Date: 1996-04-29T00:00:00+00:00	[thread overview]
Message-ID: <31850E0F.136C@software.org> (raw)


I have been trying to compile the following code as an example of using the Address 
clause in Ada 95:

     with System.Storage_Elements;     
     package Address_Test is

        type Device_Data_Type is record
           Field_1 : Integer;
           Field_2 : Integer;
        end record;

        Device_Data    : Device_Data_Type;   
        Device_Address : constant System.Address 
           := System.Storage_Elements.To_Address(16#FFFF_0000#);

        for Device_Data'Address use Device_Address;

     end Address_Test;

GNAT 3.03 subsequently gives the following error message:

     address_test.ads:13:32: invalid address clause for "Device_Data"
     address_test.ads:13:32: must be constant defined before "Device_Data" 
        (RM 13.1(22))

Can anyone provide advice for compiling this code using GNAT?
Thanks in advance!

-- Rob Pettit
--------------------------------------------------------------------    
Robert G. Pettit IV     
Member, Technical Staff  
Software Productivity Consortium
2214 Rock Hill Road                     Phone:   703-742-7318
Herndon, VA 22070                       E-Mail:  pettit@software.org
--------------------------------------------------------------------




             reply	other threads:[~1996-04-29  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-29  0:00 Rob Pettit [this message]
1996-04-29  0:00 ` GNAT 3.03 and Address Clauses Robert A Duff
1996-05-04  0:00 ` David Weller
1996-05-06  0:00   ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox