Routine Is_OK_Static_Expression itself calls Raises_Constraint_Error, so there
is no need to call both of these routines in a row. Code cleanup; semantics is
unaffected.
gcc/ada/ChangeLog:
* sem_attr.adb (Check_Array_Type): Remove extra call.
* sem_util.adb (Static_Boolean): Likewise.
Resolve (E1, Any_Integer);
Set_Etype (E1, Standard_Integer);
- if not Is_OK_Static_Expression (E1)
- or else Raises_Constraint_Error (E1)
- then
+ if not Is_OK_Static_Expression (E1) then
Flag_Non_Static_Expr
("expression for dimension must be static!", E1);
Error_Attr;
end if;
if Is_OK_Static_Expression (N) then
- if not Raises_Constraint_Error (N) then
- return Expr_Value (N);
- else
- return No_Uint;
- end if;
+ return Expr_Value (N);
elsif Etype (N) = Any_Type then
return No_Uint;
end if;
if Is_OK_Static_Expression (N) then
- if not Raises_Constraint_Error (N) then
- return Expr_Value (N);
- else
- return No_Uint;
- end if;
+ return Expr_Value (N);
elsif Etype (N) = Any_Type then
return No_Uint;