comp.lang.ada
 help / color / mirror / Atom feed
From: "Marc A. Criley" <mcqada@earthlink.net>
Subject: Re: Suggestion for Ada 0X - "Complete" Record Rep Clauses
Date: Mon, 10 Sep 2001 12:13:35 GMT
Date: 2001-09-10T12:13:35+00:00	[thread overview]
Message-ID: <3B9CA250.88DB9DF1@earthlink.net> (raw)
In-Reply-To: 87sndvsiqm.fsf@deneb.enyo.de

Florian Weimer wrote:
> 
> "Chris Miller" <chrismil@ozemail.com.au> writes:
> 
> > Record representation clauses (LRM13.5.1) allow the locations for the
> > components of a record to be specified, but there is no way to ensure that
> > the location for each and every field is specified. If you do not specify
> > the location for a component then the compiler can put it anywhere. This is
> > generally not what is wanted, if a rep clause is used then typically the
> > location of all fields will need to be specified.
> 
> Specifying the representation only partially could be used in some
> contexts, for example to rearrange some components so that they appear
> in a single cache line.

We found that records having "partial rep specs" could have the
non-specified components layed out using quite different approaches by
different compilers (porting from Alsys Ada 83 to GNAT Ada 95).  There's
nothing wrong with that, it simply reinforces the notion that one has to
know what they're doing and be aware of potential pitfalls when porting.

Marc A. Criley
Senior Staff Engineer
Quadrus Corporation
www.quadruscorp.com



  reply	other threads:[~2001-09-10 12:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-09  1:08 Suggestion for Ada 0X - "Complete" Record Rep Clauses Chris Miller
2001-09-09 12:42 ` Marc A. Criley
2001-09-09 15:53 ` Robert Dewar
2001-09-10  5:44 ` Florian Weimer
2001-09-10 12:13   ` Marc A. Criley [this message]
2001-09-18 15:06   ` Lutz Donnerhacke
replies disabled

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