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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,55f243f32a97dc7e X-Google-Attributes: gid103376,public From: csampson@cod.nosc.mil (Charles H. Sampson) Subject: Re: Elaboration_check For Instantiations Date: 1997/10/27 Message-ID: <1997Oct27.223135.2373@nosc.mil>#1/1 X-Deja-AN: 286124249 Sender: news@nosc.mil References: <1997Oct23.205254.25272@nosc.mil> Organization: Computer Sciences Corporation Newsgroups: comp.lang.ada Date: 1997-10-27T00:00:00+00:00 List-Id: In article , Robert Dewar wrote: >Tucker said > ><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.