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: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Elaboration_check For Instantiations Date: 1997/10/29 Message-ID: #1/1 X-Deja-AN: 286385446 References: <1997Oct23.205254.25272@nosc.mil> <1997Oct27.223135.2373@nosc.mil> <1997Oct28.192057.29122@nosc.mil> X-Complaints-To: usenet@news.nyu.edu X-Trace: news.nyu.edu 878103397 14416 (None) 128.122.140.58 Organization: New York University Newsgroups: comp.lang.ada Date: 1997-10-29T00:00:00+00:00 List-Id: Charles Sampson says << You are right, the GNAT implementation is entirely correct. I must have mislead you when I said "technically correct". Technically correct is correct, no doubt about it. All I meant was that GNAT is not following the programmer's wishes. If Suppress(Elaboration_check) is written, then the programmer doesn't want the check made; if the check is not made then Program_error can't be raised. The programmer's wisdom in making such a request is another discussion. Charlie>> No, that's an incorrect viewpoint. The programmer is NOT saying that they do not WANT the check, they are saying they do not NEED the check. (because they know that the checked condition cannot occur). That is a HUGE difference. pragma Suppress (x) does NOT mean "please suppress all checks for x", it means "I know my program has no instances of violations of check x, so feel free to omit checks for x if this will speed up the code." Note that if a program with Suppress fails a check, then it is erroneous, so a programmer cannot be expressing a wish about how the erroneous program is to be treated. A programmer who writes pragma Suppress not understanding this is not "unwise", just ignorant of the meaning of Suppress in Ada, a common failing of understanding. GNAT is *exactly* following the programmer's wishes, but only if the programmer knows Ada! If the programmer is writing things down in Ada thinking they mean something different from how they are defined, then yes indeed, GNAT hopefully will *not* be following the programmer's confusion. I know, the name Suppress is somewhat inherently confusing, and undoubtedly leads many programmers into the same confusion as Charlie has. Hard to know what a better name might have been ... something like Check_Not_Required (xxx) ?? Robert Dewar Ada Core Technologies