public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/38330] New: Illegal program not detected, RM 4.3.1(16/2)
@ 2008-11-30 14:51 ludovic at ludovic-brenta dot org
0 siblings, 0 replies; only message in thread
From: ludovic at ludovic-brenta dot org @ 2008-11-30 14:51 UTC (permalink / raw)
To: gcc-bugs
generic
type T1 is tagged private;
package pak1 is
type T2 is new T1 with
record
i,j: integer;
end record;
x1: T2 := T2'(2,3); -- ERROR:
x2: T2 := T2'(T1 with 2,3); -- OK
end pak1;
The declaration of x1 is illegal because the record_aggregate does not include
all components of x1, violating 4.3.1(16/2). In this particular case, since
the components inherited from T1 are unknown, the only legal kind of aggregate
is a record_extension_aggregate, as done for x2.
The compiler accepts this illegal program.
--
Summary: Illegal program not detected, RM 4.3.1(16/2)
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ludovic at ludovic-brenta dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38330
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-11-30 14:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-30 14:51 [Bug ada/38330] New: Illegal program not detected, RM 4.3.1(16/2) ludovic at ludovic-brenta 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).