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,2f84446733b06aca X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Converting C++ class to Ada Date: 1996/12/20 Message-ID: #1/1 X-Deja-AN: 205144143 references: <32ADF183.7195@lmtas.lmco.com> <32BAB8C8.7046@gsfc.nasa.gov> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-12-20T00:00:00+00:00 List-Id: In article <32BAB8C8.7046@gsfc.nasa.gov>, Stephen Leake wrote: >I can't find a rule in the RM that says this. Yeah, it's not easy to find. :-( Basically, lots of the rules about checks on parameter passing, assignment, etc., are defined in terms of type conversion. E.g. an actual parameter is always implicitly converted to the type of the formal (6.4.1(11)). Then 4.6 specifies all the run-time checks for conversions, including this null check. Also, the *literal* null is illegal for these types. It would have been helpful if we had said "An access param/discrim can never be null." somewhere as a NOTE, instead of letting you figure it out. A statement like that is a lot more useful (though less specific) than telling which combination of compile-time and run-time rules ensure that it's true. That is, to the programmer, the rule is "don't try to make one of these things null", and it's not really important to know the exact points of checking. The compiler writer of course has to know the details. - Bob