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,3dfe18b59c34a51c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-29 02:46:04 PST From: "Martin Dowie" Newsgroups: comp.lang.ada References: <3BD959E1.6C0AD647@hotmail.com> <69eC7.1430$xS6.1903@www.newsranger.com> <9rj4tf$piq$1@st520.dotcom.fr> Subject: Re: Relational Operators Date: Mon, 29 Oct 2001 10:47:56 -0000 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: ed125012.sd.edinbr.gmav.gecm.com Message-ID: <3bdd30a0$1@pull.gecm.com> X-Trace: 29 Oct 2001 10:34:08 GMT, ed125012.sd.edinbr.gmav.gecm.com Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sunqbc.risq.qc.ca!cpk-news-hub1.bbnplanet.com!news.gtei.net!newsfeed1.cidera.com!Cidera!news-hub.cableinet.net!blueyonder!btnet-peer!btnet-peer0!btnet-feed5!btnet!newreader.ukcore.bt.net!pull.gecm.com!ed125012.sd.edinbr.gmav.gecm.com Xref: archiver1.google.com comp.lang.ada:15337 Date: 2001-10-29T10:47:56+00:00 List-Id: wrote in message news:9rj4tf$piq$1@st520.dotcom.fr... > In article <69eC7.1430$xS6.1903@www.newsranger.com>, Ted Dennison wrote: > > In article <3BD959E1.6C0AD647@hotmail.com>, Gordon Cooke says... > >> > >>Is this code legal? > >> > >>procedure Test is > >> B : Boolean; > >>begin > >> B := True = True = True; > >>end Test; > > > > Yes. It looks like you found a compiler bug in Gnat. Good job. :-) > No, this code is not legal: > according to LRM 4.4: > relation ::= > simple_expression [relational_operator simple_expression] > | simple_expression [not] in range > | simple_expression [not] in subtype_mark > > And LRM 4.5 says: > relational_operator ::= = | /= | < | <= | > | >= Does this tie in with Robert Dewar's point about LRM references in compiler messages? e.g. GNAT test.adb:4:21: unexpected relational operator ObjectAda test.adb: Error: line 4 col 21 LRM:4.4(3), Operand of = cannot be another relational operation, Inserting parentheses I know which I found more useful, but perhaps this is just "My Opinion"