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,e89eefbf1ca016b X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!feeder.news-service.com!news.motzarella.org!motzarella.org!news.motzarella.org!not-for-mail From: Reto Buerki Newsgroups: comp.lang.ada Subject: Re: Discriminant & interface not implemented by full type Date: Thu, 12 Mar 2009 14:07:06 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: news.eternal-september.org U2FsdGVkX1/1++13Gge6LvU8w71HdylXye+9f6qvIyduasZQUsgYKwPlENQCk+coQs4LDQztlZypqqGwZ4unf+Rici81XrFoDZxTpCrNdaqD4EGzUGa+avOrcsRruKCD X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers NNTP-Posting-Date: Thu, 12 Mar 2009 13:07:12 +0000 (UTC) In-Reply-To: X-Auth-Sender: U2FsdGVkX184mnyKiQ8pte5tWzBBlXHrQBh2jM9O57k= Cancel-Lock: sha1:a1zmTUjDLewa1uENzVCVoCq9zXo= User-Agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103) Xref: g2news1.google.com comp.lang.ada:4067 Date: 2009-03-12T14:07:06+01:00 List-Id: Per Sandberg wrote: > Compiles fine with GNATPro 6.2.1 > /Per > > Reto Buerki wrote: >> Hi everyone, >> >> I have the following simple test application: >> >> package Full_View is >> >> type Base_Type (Num : Integer) is tagged private; >> >> type Base_Interface is interface; >> >> type New_Type is new Base_Type (Num => 11) and >> Base_Interface with private; >> >> private >> type Base_Type (Num : Integer) is tagged record >> My_Number : Integer := Num; >> end record; >> >> type New_Type is new Base_Type (Num => 11) and >> Base_Interface with null record; >> >> end Full_View; >> >> Trying to compile this with gnat gcc 4.3 in Debian/Lenny results in the >> following error: >> full_view.ads:7:09: interface "Base_Interface" not implemented by full >> type (RM-2005 7.3 (7.3/2)) >> >> When removing the (Num => 11) discrimant initialization or the >> Base_Interface interface from the New_Type type extension, the code >> compiles fine. >> >> Is this a compiler bug? Seems to me that the consistency check of the >> partial and full view of a tagged type covering interfaces does not like >> discriminants. Adam, Per thanks for your replies! I filed a GCC bug report [1]. - reto [1] - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39441