E := Errors.Table (E).Next;
end loop;
+ -- Warnings may have been posted on subexpressions of original tree
+
if Nkind (N) = N_Raise_Constraint_Error
and then Is_Rewrite_Substitution (N)
and then No (Condition (N))
then
- -- Warnings may have been posted on subexpressions of the original
- -- tree. We place the original node back on the tree to remove
- -- those warnings, whose sloc do not match those of any node in
- -- the current tree. Given that we are in unreachable code, this
- -- modification to the tree is harmless.
-
- if Is_List_Member (N) then
- Set_Condition (N, Original_Node (N));
- Check_All_Warnings (Condition (N));
- else
- Rewrite (N, Original_Node (N));
- Check_All_Warnings (N);
- end if;
+ Check_All_Warnings (Original_Node (N));
end if;
return OK;
-- to do that if we already have the base type at hand.
if Etype (L) = Index_Base then
- L_L := L;
+ L_L := New_Copy_Tree (L);
else
L_L :=
Make_Qualified_Expression (Loc,
end if;
if Etype (H) = Index_Base then
- L_H := H;
+ L_H := New_Copy_Tree (H);
else
L_H :=
Make_Qualified_Expression (Loc,