Error_Msg_N ("enumeration rep clause not allowed for this type", N);
return;
+ -- Check that the expression is a proper aggregate (no parentheses)
+
+ elsif Paren_Count (Aggr) /= 0 then
+ Error_Msg
+ ("extra parentheses surrounding aggregate not allowed",
+ First_Sloc (Aggr));
+ return;
+
-- All tests passed, so set rep clause in place
else
-- normal expansion activities, and a number of special semantic
-- rules apply (including the component type being any integer type)
- -- Badent signals that we found some incorrect entries processing
- -- the list. The final checks for completeness and ordering are
- -- skipped in this case.
-
Elit := First_Literal (Enumtype);
-- First the positional entries if any
Val := Static_Integer (Expr);
+ -- Err signals that we found some incorrect entries processing
+ -- the list. The final checks for completeness and ordering are
+ -- skipped in this case.
+
if Val = No_Uint then
Err := True;
-
elsif Val < Lo or else Hi < Val then
Error_Msg_N ("value outside permitted range", Expr);
Err := True;
New_Reference_To (
Designated_Type (Etype (F)), Loc)))),
- Subtype_Mark =>
+ Result_Definition =>
New_Reference_To (Etyp, Loc));
end Build_Spec;