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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a7dc5eccc42e4334,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!proxad.net!feeder1-2.proxad.net!cleanfeed2-a.proxad.net!nnrp3-2.free.fr!not-for-mail Date: Sun, 14 Mar 2010 22:16:57 +0100 From: Damien Carbonne User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: GNAT: bug or feature? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4b9d524a$0$22397$426a74cc@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 14 Mar 2010 22:16:58 MET NNTP-Posting-Host: 82.247.219.63 X-Trace: 1268601418 news-1.free.fr 22397 82.247.219.63:53421 X-Complaints-To: abuse@proxad.net Xref: g2news2.google.com comp.lang.ada:10536 Date: 2010-03-14T22:16:58+01:00 List-Id: Hi, When compiled with GNAT GPL 2009 or GNAT GCC 4.4.1 / Ubuntu 9.10, the following code: --------------------------------------------------- package Pack07 is type Base is tagged null record; function Create return Base; type Derived is new Base with null record; end Pack07; --------------------------------------------------- exhibits different compiler reactions depending on used options. With 'gcc -c -gnat95 pack07.ads', I get: pack07.ads:6:09: type must be declared abstract or "Create" overridden pack07.ads:6:09: "Create" has been inherited at line 6 pack07.ads:6:09: "Create" has been inherited from subprogram at line 4 This is what I expect. With 'gcc -c -gnat05 pack07.ads", the compiler tells nothing and seems to generate code. I find this surprising. I would consider this is a compiler bug. Is this the case or is it a new Ada 2005 feature? May be it is due to an installation problem, but it would be surprising. What is your opinion about this behavior? Regards, Damien Carbonne