comp.lang.ada
 help / color / mirror / Atom feed
From: csampson@cod.nosc.mil (Charles H. Sampson)
Subject: Re: Elaboration_check For Instantiations
Date: 1997/10/27
Date: 1997-10-27T00:00:00+00:00	[thread overview]
Message-ID: <1997Oct27.223135.2373@nosc.mil> (raw)
In-Reply-To: dewar.877716708@merv


In article <dewar.877716708@merv>, Robert Dewar <dewar@merv.cs.nyu.edu> wrote:
>Tucker said
>
><<Well, then I guess these compilers all had a common bug.  Alternatively,
>the code was compiled with Elaboration_Check suppressed.  You
>could add "pragma Suppress(Elaboration_Check);" to the above code,
>and it would probably not raise Program_Error (though it would then be
>officially erroneous, per RM95 11.5(26)).>>
>
>
>Actually, GNAT would still raise Program_Error. This particular case is
>easily caught at compile time, and GNAT actually replaces the instantiation
>by a "raise Program_Error" statement. There is no runtime check to be
>suppressed, so the pragma Suppress has no effect!

     Are you sure about that, Robert?  (Never fearing, he leaps back 
into the fray.)  11.5(2) says that language-defined checks, which in-
clude Elaboration_check, have to be made at run time and 3.11(14) says 
that Program_error is raised if Elaboration_check fails.

     Of course, 11.5(1) says that pragma Suppress "gives permission to 
an implementation" to omit the check, so the GNAT implementation is 
technically correct, at least.

 				Charlie


--
******

    If my user name appears as "csampson", remove the 'c' to get my
correct e-mail address.




  reply	other threads:[~1997-10-27  0:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-23  0:00 Elaboration_check For Instantiations Charles H. Sampson
1997-10-23  0:00 ` Charles H. Sampson
1997-10-24  0:00   ` Tucker Taft
1997-10-24  0:00     ` Robert Dewar
1997-10-27  0:00       ` Charles H. Sampson [this message]
1997-10-27  0:00         ` Robert Dewar
1997-10-28  0:00           ` Charles H. Sampson
1997-10-28  0:00             ` Keith Thompson
1997-10-28  0:00               ` Charles H. Sampson
1997-10-29  0:00                 ` Robert Dewar
1997-10-29  0:00                   ` Charles H. Sampson
1997-10-29  0:00                 ` W. Wesley Groleau x4923
1997-10-29  0:00                   ` Tom Moran
1997-10-30  0:00                     ` Larry Kilgallen
     [not found]                   ` <345774b3.1434102@santaclara01.news.internex.net>
1997-10-30  0:00                     ` Charles H. Sampson
1997-10-30  0:00                   ` Charles H. Sampson
1997-10-29  0:00             ` Robert Dewar
1997-10-27  0:00     ` Charles H. Sampson
1997-10-27  0:00       ` Robert Dewar
1997-10-24  0:00 ` Robert Dewar
replies disabled

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