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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,162ee844b6e6caa1,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!freenix!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Odd error with access to derived types Date: 14 Oct 2004 21:28:25 -0400 Organization: Cuivre, Argent, Or Message-ID: References: NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: melchior.cuivre.fr.eu.org 1097803716 33104 212.85.156.195 (15 Oct 2004 01:28:36 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Fri, 15 Oct 2004 01:28:36 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: In-Reply-To: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: g2news1.google.com comp.lang.ada:5229 Date: 2004-10-14T21:28:25-04:00 A.Imran writes: > Hello, > > I'm getting a very odd error from my compiler (GNAT 3.15p, also tried > the latest GCC based GNAT). > > Would anyone point out why the following is / is not valid ada? TIA. I get this: gnatmake -k -g -O0 -gnatf -gnato -gnatwa -gnatwe -gnatwL -gnatVa -I.. test -largs -bargs -E -cargs gcc -c -I./ -g -O0 -gnatf -gnato -gnatwa -gnatwe -gnatwL -gnatVa -I.. -I- ..\test.adb test.adb:1:11: warning: unit "b" is not referenced testp-b.ads:7:10: "b_type" conflicts with declaration at line 6 testp-b.ads:15:10: completion of nonlimited type cannot be limited you are declaring 'b_type' twice. But perhaps that's not what you meant. Perhaps you meant "I get an error with the second definition of b_type". But I'm not going to guess. Please post _exactly_ the code that generates the error, so we can help. > > -- begin testp-b.adb -- > package testp.b is > > -- TO FAIL: Comment the next line and leave > -- the line after that uncommented. > > -- XXX 0 Is this the line you want uncommented? I don't think so. > -- type b_type is new a_type with null record; > type b_type is new a_type with private; Did you want both definitions of 'b_type'? I don't think so. -- -- Stephe