From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,69d0258abc166f15 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Wed, 20 Apr 2005 16:00:53 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <1113836280.439166.180090@f14g2000cwb.googlegroups.com> Subject: Re: GNAT Unchecked_Union and multiple components Date: Wed, 20 Apr 2005 16:03:13 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4927.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 Message-ID: <1oidnYZHVPWbXvvfRVn-pw@megapath.net> NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-1PqsdeBZ1PNvGJJ1ArCCaaq3asQ+vDl0DSb6vXN9NWLIhtP0UgUJiMMu2TCvqKLWy9EAJvkNhXWhqmh!Q1vTmNch6rtm9AzuNmD90yWDXrNknaAdQxp+oi037EGUMQjXWuYF/67T8KD9JtsdGBdZClhY25vj X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.31 Xref: g2news1.google.com comp.lang.ada:10616 Date: 2005-04-20T16:03:13-05:00 List-Id: "Brian" 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