This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/35793] New: Illegal program not detected, RM 3.8(12)
- From: "ludovic at ludovic-brenta dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Apr 2008 21:21:38 -0000
- Subject: [Bug ada/35793] New: Illegal program not detected, RM 3.8(12)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
RM 3.8(12):
If the discriminant is used to define the constraint of a component, ...
then its name shall appear alone as a direct_name (not as part of ...
an expanded name).
The error for x3 is detected, but not x1.
package pak1 is
type T1(n: natural) is null record;
type T2(n: natural) is record
x1: string (1 .. T2.n);
x2: string (1 .. n);
x3: T1(T2.n);
x4: T1(n);
end record;
end pak1;
gcc-4.1 -c -gnat05 pak1.ads
pak1.ads:7:18: discriminant must appear alone as a direct name
gcc-4.3 -c -gnat05 pak1.ads
pak1.ads:7:18: discriminant must appear alone as a direct name
--
Summary: Illegal program not detected, RM 3.8(12)
Product: gcc
Version: 4.1.2
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=35793