comp.lang.ada
 help / color / mirror / Atom feed
From: csn!news.den.mmc.com!possum.den.mmc.com!dow@boulder.colorado.edu  (Mark D
Subject: Re: Is this valid Ada?
Date: 8 Nov 91 20:53:35 GMT	[thread overview]
Message-ID: <1991Nov8.205335.23255@den.mmc.com> (raw)

In article <37806@shamash.cdc.com> case@shamash.cdc.com (Steven V. Case) writes
:
>The following code fragment compiles on two of the Ada compilers that I am
>presently using.  However, on two other compilers that I am using it won't
>compile.  The later two compilers provide an error message indicating that
>the call to Is_This_Ambiguous is an ambiguous statement and references 
>paragraph 8.7 of the LRM.
>
>I have read paragraph 8.7 several times and cannot find anything that leads
>me to believe that this code fragment is not legal.  Consequently, I don't
>know which pair of compilers has a bug.  If the code is legal, then the
>compilers issuing the error message have a bug.  If the code is illegal, 
>then the compilers not issuing the error message have a bug.
>
>Anyone care to offer an opinion?
>

I am convinced that this is legal Ada and that the compilers that flagged it
as an error are wrong.  This opinion is based not so much on the information
in paragraph 8.7, or 8.3 (another logical place to look) but instead on the 
information in paragraph 8.4.  

Paragraph 8.4 (5) states:
"A potentially visible declaration is not made directly visible if the place
considered is within the immediate scope of a homograph of the declaration."

The LRM continues with 8.4 (8):
"The above rules guarantee that a declaration that is made directly visible by
a use clause cannot hide an otherwise directly visible declaration."

By the way, a co-worker of mine who has a particular affinity for C is 
flabbergasted by a language where the legality of so few lines of code is
in question.  Of course, I am sure that it would not take any of us very
long to write a few lines of C that may be somewhat confusing. ;-)


-- 

Mark Dow      dow@pogo.den.mmc.com

             reply	other threads:[~1991-11-08 20:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-11-08 20:53 csn!news.den.mmc.com!possum.den.mmc.com!dow [this message]
  -- strict thread matches above, loose matches on Subject: below --
1991-11-08 15:43 Is this valid Ada? Bill Yow
1991-11-08 13:31 Jack Dean
1991-11-08  5:14 cis.ohio-state.edu!magnus.acs.ohio-state.edu!paperboy.micro.umn.edu!cs.um
replies disabled

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