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,32dcee4844599b87,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-12-17 13:22:01 PST Path: supernews.google.com!sn-xit-02!supernews.com!isdnet!isdnethub!not-for-mail From: Thierry&Annick Newsgroups: comp.lang.ada Subject: GNAT Error message Date: Sun, 17 Dec 2000 19:11:54 +0100 Message-ID: <3A3D01EA.37CB440B@libertysurf.fr> NNTP-Posting-Host: dyn-213-36-91-178.ppp.libertysurf.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news5.isdnet.net 977088026 15700 213.36.91.178 (17 Dec 2000 21:20:26 GMT) X-Complaints-To: abuse@isdnet.net NNTP-Posting-Date: 17 Dec 2000 21:20:26 GMT X-Mailer: Mozilla 4.5 [fr] (Win95; I) X-Accept-Language: fr Xref: supernews.google.com comp.lang.ada:3217 Date: 2000-12-17T21:20:26+00:00 List-Id: Consider the following (incorrect) code "test.ada" : generic type Index_Type is (<>); package Generic_Array is type Instance_Type is array (Index_Type) of Integer; procedure Fill (This : out Instance_Type); end Generic_Array; package body Generic_Array is procedure Fill (This : out Instance_Type) is begin for Index in Index_Type loop This (Index) := Integer (Index - This'First); -- Line 13 end loop; end Fill; end Generic_Array; with Generic_Array; procedure Check is type Int_Type is range 0 .. 10; package Int_Array is new Generic_Array (Int_Type); begin null; end Check; The GNAT error message after gnatchop'ed (gnatchop -q -r -w) is : test.ada:13:38: invalid operand types for operator "-" test.ada:13:38: left operand has type "Index_Type" defined at test.ada:2 test.ada:13:38: right operand has type "Index_Type" defined at test.ada:2 gnatmake: "check.adb" compilation error Ok, my fault : Index_Type should be "range <>" to have a "-" operator, but the error message is not clear. Anybody knows what will this message be with others compilers ?