From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6063 invoked by alias); 14 Nov 2012 12:53:00 -0000 Received: (qmail 5982 invoked by uid 48); 14 Nov 2012 12:52:47 -0000 From: "georggcc at googlemail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/55324] New: diagnostic about abstract new in type derivation misleading due to being overly terse Date: Wed, 14 Nov 2012 12:53:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: georggcc at googlemail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg01239.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55324 Bug #: 55324 Summary: diagnostic about abstract new in type derivation misleading due to being overly terse Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: ada AssignedTo: unassigned@gcc.gnu.org ReportedBy: georggcc@googlemail.com When deriving an abstract type from a tagged type but omitting the record extension part, GNAT says that "abstract" is not allowed here. Actually it is, following LRM 3.4 about derived_type_definition (similarly, 12.5.1), but only if followed by the record extension part. Maybe the "here" of the message could be expanded a bit, "here[, only for ...]" package x is type T is abstract tagged null record; type S is abstract new T; -- with null record; end x; $ gnatmake -gnatwa -gnaty -gnatv x.ads gcc -c -gnatwa -gnaty -gnatv x.ads GNAT 4.8.0 20120611 (experimental) Copyright 1992-2012, Free Software Foundation, Inc. Compiling: x.ads (source file time stamp: 2012-11-14 12:13:28) 5. type S is abstract new T; -- with null record; | >>> "abstract" not allowed here, ignored 7 lines: 1 error gnatmake: "x.ads" compilation error