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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a1d2fe1ec5136718,start X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!feeder.news-service.com!news.motzarella.org!motzarella.org!not-for-mail From: =?ISO-8859-1?Q?S=E9bastien_Morand?= Newsgroups: comp.lang.ada Subject: Generic warning Date: Tue, 17 Jun 2008 16:44:10 +0000 Organization: A noiseless patient Spider Message-ID: NNTP-Posting-Host: 196.207.241.154 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: feeder.motzarella.org U2FsdGVkX18fRmo5cwaTMI431ttYnOfHqXbh0dtRzsepkYl4fLjAzaizmZ2uUjeVg2Vqw3uVG/frD/+uqDx4S3YTGYL1Udx2x5fxXBpnHG8mQ2hGEyuCwAjELPo9a+3uExlAGtajKPTUFRzmcyNwwQ== X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers NNTP-Posting-Date: Tue, 17 Jun 2008 16:44:16 +0000 (UTC) X-Auth-Sender: U2FsdGVkX18snOHRhScfHG4krsPHifnpjUUNMpCWAvpyW9OiBo51bA== Cancel-Lock: sha1:HkD9OeEZFOnIoa/nRkpnjwK8F9I= User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) X-Enigmail-Version: 0.95.6 Xref: g2news1.google.com comp.lang.ada:744 Date: 2008-06-17T16:44:10+00:00 List-Id: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'm implementing a B-Tree in Ada using indefinite private type: generic -- Element to be stored in the btree type Element (<>) is private; -- Null element when not found Element_Null: Element; -- Key of the element in the B-Tree wich must be compareable type Key (<>) is private; with function "<"(k1: in Key; k2: in Key) return Boolean; with function ">"(k1: in Key; k2: in Key) return Boolean; with procedure Put_Line(k: in Key); -- Order of the B-Tree Order: Positive; package SCMAL.Tools.BTrees is -- Omitted end SCMAL.Tools.BTrees; When I create an instance of the package using the following code: 9 package IT is new SCMAL.Tools.BTrees( 10 Element => Integer, 11 Element_Null => 0, 12 Key => Integer, 13 "<" => "<", 14 ">" => ">", 15 Put_Line => Put_Line, 16 Order => 1 17 ); I got the following warnings: btreetests.adb:9:04: warning: in instantiation at scmal-tools-btrees.adb:159 btreetests.adb:9:04: warning: value not in range of subtype of "Standard.Integer" defined at scmal-tools-btrees.ads:82, instance at line 9 btreetests.adb:9:04: warning: "Constraint_Error" will be raised at run time btreetests.adb:9:04: warning: in instantiation at scmal-tools-btrees.adb:160 btreetests.adb:9:04: warning: value not in range of subtype of "Standard.Integer" defined at scmal-tools-btrees.ads:83, instance at line 9 btreetests.adb:9:04: warning: "Constraint_Error" will be raised at run time btreetests.adb:9:04: warning: in instantiation at scmal-tools-btrees.adb:161 btreetests.adb:9:04: warning: value not in range of subtype of "Standard.Integer" defined at scmal-tools-btrees.ads:84, instance at line 9 btreetests.adb:9:04: warning: "Constraint_Error" will be raised at run time btreetests.adb:9:04: warning: in instantiation at scmal-tools-btrees.adb:177 btreetests.adb:9:04: warning: value not in range of subtype of "Standard.Integer" defined at scmal-tools-btrees.ads:82, instance at line 9 btreetests.adb:9:04: warning: "Constraint_Error" will be raised at run time btreetests.adb:9:04: warning: in instantiation at scmal-tools-btrees.adb:178 btreetests.adb:9:04: warning: value not in range of subtype of "Standard.Integer" defined at scmal-tools-btrees.ads:83, instance at line 9 btreetests.adb:9:04: warning: "Constraint_Error" will be raised at run time but I run time it works fine and I have no constraint error. Where theses warnings come from? How to correct my code? Is there a way to avoid to take the default "<" and ">" function? Thanks by advance, Sebastien -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) iD8DBQFIV+na+zV9xm4PlDQRAn1vAJ4hWuphvyP5DAU/zTB2iH4jP+DuMQCdF252 4ZGus6+yxjCwqug3lqycgsY= =XSuj -----END PGP SIGNATURE-----