Re: accessing record element (question to the pros)
- From: Simon Wright <simon@xxxxxxxxxxxx>
- Date: Fri, 24 Feb 2006 19:04:55 +0000
"Jeffrey R. Carter" <spam@xxxxxxxx> writes:
However, in general, you can't do what you seem to be trying to
do. Variant records do not allow unchecked type conversion; the
language rules prohibit it. That's what Ada.Unchecked_Conversion is
for.
GNAT (certainly in recent versions) has pragma Unchecked_Union
(http://gcc.gnu.org/onlinedocs/gcc-4.0.2/gnat_rm/Pragma-Unchecked_005fUnion.html#Pragma-Unchecked_005fUnion).
NB, compiler-specific.
.
- Follow-Ups:
- Re: accessing record element (question to the pros)
- From: Randy Brukardt
- Re: accessing record element (question to the pros)
- References:
- accessing record element (question to the pros)
- From: Norbert Caspari
- Re: accessing record element (question to the pros)
- From: Jeffrey R. Carter
- accessing record element (question to the pros)
- Prev by Date: Re: Quick question about Ada code formatting.
- Next by Date: Re: help with include and library files in GPS
- Previous by thread: Re: accessing record element (question to the pros)
- Next by thread: Re: accessing record element (question to the pros)
- Index(es):
Relevant Pages
|
|