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-Thread: 103376,d89b829a7e0c6c44 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.teledata-fn.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: GNAT-2005 From: Georg Bauhaus In-Reply-To: <1163141479.498169.10580@b28g2000cwb.googlegroups.com> References: <1163141479.498169.10580@b28g2000cwb.googlegroups.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: # Message-ID: <1163155936.5361.10.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Date: Fri, 10 Nov 2006 11:52:16 +0100 NNTP-Posting-Date: 10 Nov 2006 11:49:45 CET NNTP-Posting-Host: 45954a07.newsspool4.arcor-online.net X-Trace: DXC=2lVHZ1TRj2F@Y=h<_c3PkH4IUK 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