public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/15408] New: Overridden functions not recognized
@ 2004-05-13 11:26 bjorn_persson at sverige dot nu
2004-05-13 11:27 ` [Bug ada/15408] " bjorn_persson at sverige dot nu
2004-05-13 11:31 ` bjorn_persson at sverige dot nu
0 siblings, 2 replies; 3+ messages in thread
From: bjorn_persson at sverige dot nu @ 2004-05-13 11:26 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2126 bytes --]
In the attached files are a generic package with a private abstract tagged type
Parameter_Definition and two abstract functions, a private generic subpackage
with an abstract type Intermediate_Definition derived from Parameter_Definition,
and a generic child package with a private concrete type
Typed_Parameter_Definition derived from Intermediate_Definition. Gnat gives an
incorrect error message on the declaration of Typed_Parameter_Definition:
extracted-discrete_parameters.ads:19:09: type must be declared abstract or
"Meaning" overridden
That function is overridden on line 23. If I take Meaning away I get the same
error saying that Default must be overridden, which I have also done.
GCC-Gnat 3.4.0 and 3.3.2 and ACT-Gnat 3.15p all print the same message, and I
have been told that ACT-Gnat 3.16a1 and 5.02a behave the same. I have also been
told that Apex and ObjectAda compile this without complaint.
For your information, any one of the following changes removes the complaint:
· Deriving Typed_Parameter_Definition directly from Parameter_Definition.
· Removing "private" from the parent package.
· Turning the child package into a private subpackage.
· Removing "is abstract" from the function declarations. (I have checked that
the functions do get overridden in this case.)
I believe this code is legal and Gnat should accept it, but if it really is
illegal then a better message should be printed. The current message is clearly
wrong.
With thanks to the helpful people in comp.lang.ada. (Message ID
HLJmc.58389$mU6.237165@newsb.telia.net with follow-ups.)
--
Summary: Overridden functions not recognized
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bjorn_persson at sverige dot nu
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i386-redhat-linux
GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15408
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug ada/15408] Overridden functions not recognized
2004-05-13 11:26 [Bug ada/15408] New: Overridden functions not recognized bjorn_persson at sverige dot nu
@ 2004-05-13 11:27 ` bjorn_persson at sverige dot nu
2004-05-13 11:31 ` bjorn_persson at sverige dot nu
1 sibling, 0 replies; 3+ messages in thread
From: bjorn_persson at sverige dot nu @ 2004-05-13 11:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bjorn_persson at sverige dot nu 2004-05-12 19:36 -------
Created an attachment (id=6268)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6268&action=view)
parent package
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15408
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug ada/15408] Overridden functions not recognized
2004-05-13 11:26 [Bug ada/15408] New: Overridden functions not recognized bjorn_persson at sverige dot nu
2004-05-13 11:27 ` [Bug ada/15408] " bjorn_persson at sverige dot nu
@ 2004-05-13 11:31 ` bjorn_persson at sverige dot nu
1 sibling, 0 replies; 3+ messages in thread
From: bjorn_persson at sverige dot nu @ 2004-05-13 11:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bjorn_persson at sverige dot nu 2004-05-12 19:36 -------
Created an attachment (id=6269)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6269&action=view)
child package
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15408
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-05-12 19:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-13 11:26 [Bug ada/15408] New: Overridden functions not recognized bjorn_persson at sverige dot nu
2004-05-13 11:27 ` [Bug ada/15408] " bjorn_persson at sverige dot nu
2004-05-13 11:31 ` bjorn_persson at sverige dot nu
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).