From: pascal.malaise@gmail.com
Subject: Static bounds of loop - compilation error
Date: Tue, 30 Oct 2012 06:26:08 -0700 (PDT)
Date: 2012-10-30T06:26:08-07:00 [thread overview]
Message-ID: <6cc8e815-96c3-4a79-8bcd-e3aea906b889@googlegroups.com> (raw)
Hi Ada experts,
can anyone explain the following compilation errors:
procedure T is
type E is (A, B, C);
subtype S is E range A .. B;
X, Y : S;
begin
X := A;
Y := B;
for I in S range X .. Y loop
case I is
when A => null;
when B => null;
end case;
end loop;
end T;
>> missing case value: "C"
A similar example where S is a subtype of Positive leads to the same error and also: bounds of "I" are not static, alternatives must cover base type
Indeed, X and Y are not static but the bounds of S are, and all the values of S are covered in the "case".
So is it a bug?
Thank you
next reply other threads:[~2012-10-30 13:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-30 13:26 pascal.malaise [this message]
2012-10-30 14:37 ` Static bounds of loop - compilation error Georg Bauhaus
2012-10-30 16:10 ` Adam Beneschan
2012-10-30 17:03 ` Yannick Duchêne (Hibou57)
2012-10-30 17:15 ` Yannick Duchêne (Hibou57)
2012-10-31 13:18 ` Marc C
2012-10-31 16:23 ` pascal.malaise
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox