comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Using the GNAT defined attribute: 'Enum_Rep
Date: 1997/09/06
Date: 1997-09-06T00:00:00+00:00	[thread overview]
Message-ID: <dewar.873592148@merv> (raw)
In-Reply-To: 340D6C5D.2E53@pseserv3.fw.hac.com


W.W.G. says

<<Is this true ?  Seems to me it's legal (though I've never seen
it happen) for an implementation to generate anything it wanted
for a representation as long as ordering, indexing, etc. worked.>>


No, not at all, the whole point of enumeration types is that this is the
one place where Ada *does* have something to say about representation.
The ACVC interpretation (and hence what all Ada compilers do), is that
if you use an enumeration representation clause, then the representation
must match that of integers of the same size.

And of course Pos and Val will NOT match representations assigned in
this manner. Wes, if we believed your claim above, we would be believing
that enumeration representation clauses have no runtime semantics. That
is not the case!





  reply	other threads:[~1997-09-06  0:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-27  0:00 Using the GNAT defined attribute: 'Enum_Rep Marin David Condic, 561.796.8997, M/S 731-96
1997-09-03  0:00 ` W. Wesley Groleau x4923
1997-09-06  0:00   ` Robert Dewar [this message]
1997-09-08  0:00     ` W. Wesley Groleau x4923
1997-09-08  0:00       ` Matthew Heaney
1997-09-08  0:00     ` Robert A Duff
1997-09-08  0:00   ` Robert A Duff
1997-09-08  0:00     ` W. Wesley Groleau x4923
1997-09-08  0:00       ` Matthew Heaney
1997-09-09  0:00         ` Robert A Duff
1997-09-11  0:00           ` Robert Dewar
1997-09-08  0:00 ` Robert A Duff
  -- strict thread matches above, loose matches on Subject: below --
1997-09-09  0:00 Marin David Condic, 561.796.8997, M/S 731-96
1997-09-09  0:00 ` Robert A Duff
1997-09-09  0:00 Marin David Condic, 561.796.8997, M/S 731-96
1997-09-09  0:00 ` W. Wesley Groleau x4923
1997-09-11  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