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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.10.203 with SMTP id 72mr2250268iok.8.1511970509373; Wed, 29 Nov 2017 07:48:29 -0800 (PST) X-Received: by 10.157.14.137 with SMTP id 9mr73166otj.14.1511970509150; Wed, 29 Nov 2017 07:48:29 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.fcku.it!peer01.fr7!futter-mich.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!i6no767895itb.0!news-out.google.com!x87ni955ita.0!nntp.google.com!i6no767890itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 29 Nov 2017 07:48:28 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=192.54.144.229; posting-account=uO_vzwoAAAAM7jhNZDkCkZpIghqP_5r8 NNTP-Posting-Host: 192.54.144.229 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: simple code can't compiled, without clear compiler warning (not clear enough to me at least) From: pascal.malaise@gmail.com Injection-Date: Wed, 29 Nov 2017 15:48:29 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Body-CRC: 1644015133 X-Received-Bytes: 2123 Xref: reader02.eternal-september.org comp.lang.ada:49248 Date: 2017-11-29T07:48:28-08:00 List-Id: Le mercredi 29 novembre 2017 16:17:03 UTC+1, Mehdi Saada a =C3=A9crit=C2=A0= : > $ gcc-6 -c tri_selection.ads=20 > cannot generate code for file tri_selection.ads (package spec)=20 > gnatmake: "tri_selection.ads" compilation error=20 >=20 > I thought specifications could be compiled separately ? In fact GNAT compiles the spec (no error in this case) but does not generat= e the code associated to it? > temp :=3D T(A);=20 T is an array, indexed by Indice_Type, of elements of type Element_Type. Swap shall swap two elements of T knwowing the *indexes* of elements. You should declare: procedure Swap (T: in out Tableau_type; I, J : in out Indice_Type) and implement it and call it accordingly.