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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,72a0bc6240d264e3 X-Google-Attributes: gid103376,public From: JSharer-No_Spam_@psu.edu (Jack W. Sharer) Subject: Re: Access and alias Date: 2000/04/10 Message-ID: <8cshra$qbq@r02n01.cac.psu.edu>#1/1 X-Deja-AN: 609078824 References: <8ckeup$9ed$1@nnrp1.deja.com> Organization: Penn State University, Center for Academic Computing Reply-To: JSharer-No_Spam_@psu.edu (Jack W. Sharer) Newsgroups: comp.lang.ada Date: 2000-04-10T00:00:00+00:00 List-Id: The following code does not compile. Why? How do I fix it? with Interfaces.C.Strings; use Interfaces.C.Strings; procedure Test_Access is procedure EngOutputBuffer ( OutputBuffer: in Chars_Ptr ); pragma Import ( C, EngOutputBuffer, "engOutputBuffer" ); Matlab_Output: aliased Interfaces.C.Char_Array(1..50000); begin EngOutputBuffer ( To_Chars_Ptr ( Matlab_Output'Access ) ); end Test_Access; The compiler is gnat under Sun Solaris. The compiler generated messages are warning: aliased object has explicit bounds warning: declare with explicit initialization warning: for use with unconstrained access object subtype must statically match designated subtype