comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert C. Leif" <rleif@rleif.com>
To: "Comp. Lang. Ada" <comp.lang.ada@ada-france.org>
Subject: Re: for Object_Size use 0
Date: Wed, 13 Apr 2005 05:02:35 -0700
Date: 2005-04-13T05:02:35-07:00	[thread overview]
Message-ID: <mailman.22.1113393785.24457.comp.lang.ada@ada-france.org> (raw)

   I changed Martin Dowie's example below to
      
      type Fl_520_540_Rec_Type is null record;
            for Fl_520_540_Rec_Type'Size use 0;
         Fl_520_540_Rec : Fl_520_540_Rec_Type;
      
      I also changed 'Object_Size to 'Size.
      The results with GNAT are essentially the same as previously.
      The size of Fl_520_540_Rec is  8
      The Empty'Size is  8
      The Byte'Size  is  8
      
      The Size(Empty) is  8
      The Size(Byte) is  8
      
      The size of the Fl_520_540_or_Empty_Rec is  64
      The size of the Fl_520_540_or_Null_Rec is  32
      The Size (Fl_520_540_or_Null_Rec) is  32
      The size of the Fl_520_540_or_Byte_Rec is  64
      
      Is this truly a GNAT problem or is the standard ambiguous?  If the Ada
standard is ambiguous, should it be clarified?
      Bob Leif 
      -------------------------------------
      Message: 5
      Date: Wed, 13 Apr 2005 08:58:43 +0100
      From: "Martin Dowie" <martin.dowie@baesystems.com>
      Subject: Re: for Object_Size use 0
      To: comp.lang.ada@ada-france.org
      Message-ID: <425ccf77_1@glkas0286.greenlnk.net>
      
      Robert C. Leif wrote:
      >       --  This is a test of whether Ada can have a type with a size
      
      You're program isn't Ada it's GNAT.
      
      I think the answer is "depends on your compiler", e.g.
      
         type Foo is null record;
         for Foo'Size use 0;
      
         Bar : Foo;
      
      GNAT:        Bar'Size => 8
      ObjectAda:  Bar'Size => 0
      
      Cheers
      
      -- Martin
      




             reply	other threads:[~2005-04-13 12:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-13 12:02 Robert C. Leif [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-04-14  5:20 for Object_Size use 0 Christoph Grein
2005-04-14 14:48 ` Robert A Duff
2005-04-13  1:52 Robert C. Leif
2005-04-13  7:58 ` Martin Dowie
2005-04-13 15:51 ` Robert A Duff
replies disabled

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