comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <bauhaus@futureapps.de>
Subject: Re: GNAT-2005
Date: Fri, 10 Nov 2006 11:52:16 +0100
Date: 2006-11-10T11:49:45+01:00	[thread overview]
Message-ID: <1163155936.5361.10.camel@localhost.localdomain> (raw)
In-Reply-To: <1163141479.498169.10580@b28g2000cwb.googlegroups.com>

On Thu, 2006-11-09 at 22:51 -0800, rashmi wrote:
> Dear all,
> 
> I have a problem with trying to understand GNAT's working for the
> following:
> ________________________________________________________________________________
> package PKGE_NasRdFuns is
> 	function FUNC_ScBAVCk(RE_ScBA : in RE_SclrBA; RE_CtBA : in RE_CatgBA)
> return TF_Done;
> 	function FUNC_ScBAFCk(RE_ScBA : in RE_SclrBA; RE_CtBA : in RE_CatgBA)
> return TF_Done;
> --	function FUNC_ScP4VCk(RE_ScP4 : in RE_SclrP4; RE_CtP4 : in
> RE_CatgP4) return TF_Done;
> --	function FUNC_ScP4FCk(RE_ScP4 : in RE_SclrP4; RE_CtP4 : in
> RE_CatgP4) return TF_Done;
> 	function FUNC_BAFDIRd(IN_FL04,IN_FL05,IN_NDim : in Integer) return
> RE_BAFDIm;
> 	function FUNC_BAVCPRd(IN_VC02,IN_VC03 : in Integer) return RE_BAVCPo;
> 	function FUNC_BAVPLRd(IN_VC04,IN_VC05 : in Integer) return RE_BAVPLn;
> 	function FUNC_BAVMBRd(IN_VM02,IN_VM03 : in Integer) return RE_BAVMBr;
> 	function FUNC_BAFPLRd(IN_FF03,IN_FF04 : in Integer) return RE_BAFPLn;
> 	function FUNC_BAFORRd(IN_FL02,IN_FL03 : in Integer) return RE_BAFORn;
> end PKGE_NasRdFuns ;
> _____________________________________________________________________________
> 
> 1. Given above is an ada spec package (.ads) PKGE_NASRdFuns with
> specifications for many functions such as FUNC_ScBAVCk, FUNC_ScBAFCk,
> etc.
> 2. Parameters such as RE_ScBA are records defined in another package,
> while IN_VC02, IN_VC03 etc. are scalars.
> 3. I find that if I delete the first few lines that give specs for
> FUNC_ScBAVCK or FUNC_ScBAFCk, for which records are parameters, and
> then compile the package's body (.adb), GNAT does not report that
> functions are undefined. On the other hand, if I delete a specs line
> such as that for FUNC_BAVCPRd for which scalars are parameters, GNAT
> immediately reports "function FUNC_BAVCPRd undefined" when I compile
> the body.

Just a guess, without seeing the package body:
Are there function bodies in the package body that call
the functions you deleted from the spec (only)? In this case
the compiler may know a function because it is still defined
in the body before it is used, but does not know some other
function that is used before it is defined later in the body.


-- Georg 





  reply	other threads:[~2006-11-10 10:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-10  6:51 GNAT-2005 rashmi
2006-11-10 10:52 ` Georg Bauhaus [this message]
2006-11-10 13:37 ` GNAT-2005 Stephen Leake
2006-11-10 16:56   ` GNAT-2005 Adam Beneschan
2006-11-12 18:55     ` GNAT-2005 Martin Krischik
2006-11-13 20:35       ` GNAT-2005 Simon Wright
2006-11-13 22:12         ` GNAT-2005 Jean-Pierre Rosen
2006-11-13 22:25         ` GNAT-2005 Georg Bauhaus
2006-11-13 23:41         ` GNAT-2005 Björn Persson
2006-11-14  7:16         ` GNAT-2005 Pascal Obry
2006-11-15 22:57           ` GNAT-2005 Simon Wright
2006-11-10 15:13 ` GNAT-2005 Wilhelm Spickermann
replies disabled

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