comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: GNAT Unchecked_Union and multiple components
Date: Wed, 20 Apr 2005 16:03:13 -0500
Date: 2005-04-20T16:03:13-05:00	[thread overview]
Message-ID: <1oidnYZHVPWbXvvfRVn-pw@megapath.net> (raw)
In-Reply-To: 1113836280.439166.180090@f14g2000cwb.googlegroups.com

"Brian" <brian.ngc@gmail.com> wrote in message
news:1113836280.439166.180090@f14g2000cwb.googlegroups.com...
> Hi,
>
> I've started to use GNAT 3.15p and noticed it handles the pragma
> Unchecked_Union differently from other compilers.  According to the
> GNAT Reference Manual "Each variant has a component list with a single
> component.", if you violate this rule the compiler will generate the
> error "Unchecked_Union variant can have only one component".  Other
> compilers allow multiple components per variant.

As does the upcoming Ada 2006.

> Is there a GNAT
> compiler switch I can use to loosen this restriction?

Not with GNAT 3.15p, but I believe the current versions of GNAT (which
others here can explain how to get better than I can) in fact support
Unchecked_Union as in the proposed Amendment to Ada (commonly known as Ada
2006 or Ada 2005).

             Randy Brukardt






      reply	other threads:[~2005-04-20 21:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-18 14:58 GNAT Unchecked_Union and multiple components Brian
2005-04-20 21:03 ` Randy Brukardt [this message]
replies disabled

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