comp.lang.ada
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
Subject: Re: Operator visibility question
Date: 03 Jun 2001 18:34:26 +0200
Date: 2001-06-03T18:34:26+02:00	[thread overview]
Message-ID: <87hexx34kt.fsf@deneb.enyo.de> (raw)
In-Reply-To: ba18d5cb.0106030548.62aa45e2@posting.google.com

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.



  parent reply	other threads:[~2001-06-03 16:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-03 13:48 Operator visibility question Rod Chapman
2001-06-03 14:19 ` Jeff Creem
2001-06-03 15:47 ` Nacho Robledo
2001-06-03 20:15   ` Robert A Duff
2001-06-04 15:24     ` Rod Chapman
2001-06-04 17:55     ` Nacho Robledo
2001-06-04 21:27       ` Ted Dennison
2001-06-03 16:34 ` Florian Weimer [this message]
2001-06-04 15:52   ` Ted Dennison
2001-06-04 22:12     ` Florian Weimer
2001-06-05 12:24       ` Rod Chapman
2001-06-03 20:13 ` Robert A Duff
replies disabled

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