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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,77f1de37204ed8a6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-03 09:20:44 PST Path: archiver1.google.com!news2.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!wanadoo.fr!fr.clara.net!heighliner.fr.clara.net!newsfeed.germany.net!newsfeed2.easynews.net!easynews.net!news.cid.net!news.enyo.de!news1.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: Operator visibility question Date: 03 Jun 2001 18:34:26 +0200 Organization: Enyo's not your organization Message-ID: <87hexx34kt.fsf@deneb.enyo.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Xref: archiver1.google.com comp.lang.ada:8039 Date: 2001-06-03T18:34:26+02:00 List-Id: rod@praxis-cs.co.uk (Rod Chapman) writes: > The SPARK Examiner rejects the declaration of C with the message: > > 9 C : constant Boolean := (A + 2) < B; -- Is "<" visible here? > ^ > *** Semantic Error :309: Operator not visible for these types. This error message seems to be correct. > On the other hand, GNAT 3.13 accepts the code with no errors. Can anyone > explain which is right, and (more importantly) why? If one argument of a comparison operator is a universal integer, a universal real, a string, or an aggregate, then the visibility check is not performed. I guess the bug is in somehwere in Sem_Ch4.Find_Comparison_Types.Try_One_Interp, but I'm not sure, and it's probably due to the way GNAT deals with operators for universal types.