public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/18227] New: incomplete type in private part of inner package visible in outer package
@ 2004-10-30 0:28 bauhaus at futureapps dot de
2004-10-30 0:46 ` [Bug ada/18227] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: bauhaus at futureapps dot de @ 2004-10-30 0:28 UTC (permalink / raw)
To: gcc-bugs
An incomplete type declared in the private part of a nested
package can be used in the declaration of an access type in the
enclosing package. This goes unnoticed.
The compiler seems to notice this if and only if the incomplete
type is used in the definition of something else (I guess).
For example in an attempt to make a subtype or derived type or,
as in the lines commented below, when it is used as a function's
return type.
package Outer is
package Inner is
private
type TI;
end Inner;
type T is access all Inner.TI; -- no complaint!
private
type TP is access all Inner.TI; -- no complaint!
end Outer;
package body Outer is
package body Inner is
type TI is null record;
end Inner;
-- function trigger return Inner.TI is -- o.K., complaint
-- begin
-- return null record;
-- end trigger;
end Outer;
-- regards, Georg
--
Summary: incomplete type in private part of inner package visible
in outer package
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bauhaus at futureapps dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18227
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug ada/18227] incomplete type in private part of inner package visible in outer package
2004-10-30 0:28 [Bug ada/18227] New: incomplete type in private part of inner package visible in outer package bauhaus at futureapps dot de
@ 2004-10-30 0:46 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-30 0:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-30 00:46 -------
*** This bug has been marked as a duplicate of 18221 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18227
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-10-30 0:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-30 0:28 [Bug ada/18227] New: incomplete type in private part of inner package visible in outer package bauhaus at futureapps dot de
2004-10-30 0:46 ` [Bug ada/18227] " pinskia at gcc dot gnu dot org
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).