comp.lang.ada
 help / color / mirror / Atom feed
From: pascal.malaise@gmail.com
Subject: Re: simple code can't compiled, without clear compiler warning (not clear enough to me at least)
Date: Wed, 29 Nov 2017 07:48:28 -0800 (PST)
Date: 2017-11-29T07:48:28-08:00	[thread overview]
Message-ID: <a9e37acf-82b5-4120-ad19-4ecd3782b99d@googlegroups.com> (raw)
In-Reply-To: <e4148718-aad2-4802-b7cf-ea76ceb04472@googlegroups.com>

Le mercredi 29 novembre 2017 16:17:03 UTC+1, Mehdi Saada a écrit :
> $ gcc-6 -c tri_selection.ads 
> cannot generate code for file tri_selection.ads (package spec) 
> gnatmake: "tri_selection.ads" compilation error 
> 
> I thought specifications could be compiled separately ?
In fact GNAT compiles the spec (no error in this case) but does not generate the code associated to it?

>           temp := T(A); 
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.

  reply	other threads:[~2017-11-29 15:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-29 15:17 simple code can't compiled, without clear compiler warning (not clear enough to me at least) Mehdi Saada
2017-11-29 15:48 ` pascal.malaise [this message]
2017-11-29 16:11 ` A. Cervetti
2017-11-29 17:27 ` Mehdi Saada
2017-11-29 18:37   ` AdaMagica
replies disabled

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