comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: access aliased obstacle
Date: 1996/07/09
Date: 1996-07-09T00:00:00+00:00	[thread overview]
Message-ID: <dewar.836941218@schonberg> (raw)
In-Reply-To: 4rsmn6$hvc@news1.delphi.com


tmoran says

"  I think of a C union as essentially a variant record with the
discriminant outside the record (in some other variable entirely).
C probably does think of this as a union, although it fits an Ada
discriminated record perfectly.  What is this 'Unchecked_Union'?
I don't see it in my LRM."

That is precisely the view that Unchecked_Union takes, it allows the
use of a variant record with no variant field stored, so it can exactly
map to a C union.

This pragma is implemented with consistent semantics in both the
Intermetrics compilers and in GNAT, and is used in the Win32 bindings.
For details, see the file features included with the GNAT documentation,
which has a full description of this pragma. You will definitely not
find it in the RM for the simple reason that it is not there. Tecnhnically
this is an imlementation defined attribute, but in practice it is one on
which there is agreement that it will be implemented consistently across
compilers.





  parent reply	other threads:[~1996-07-09  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-09  0:00 access aliased obstacle tmoran
1996-07-09  0:00 ` Laurent Guerby
1996-07-09  0:00   ` Robert Dewar
1996-07-09  0:00 ` Laurent Guerby
1996-07-09  0:00   ` Robert Dewar
1996-07-10  0:00     ` Robert A Duff
1996-07-09  0:00 ` Robert Dewar [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-07-04  0:00 tmoran
1996-07-04  0:00 ` Robert Dewar
1996-07-06  0:00 ` Laurent Guerby
1996-07-07  0:00 ` 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