public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/55324] New: diagnostic about abstract new in type derivation misleading due to being overly terse
@ 2012-11-14 12:53 georggcc at googlemail dot com
0 siblings, 0 replies; only message in thread
From: georggcc at googlemail dot com @ 2012-11-14 12:53 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-11-14 12:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-14 12:53 [Bug ada/55324] New: diagnostic about abstract new in type derivation misleading due to being overly terse georggcc at googlemail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).