Call to First on empty list is intentionally returning Empty.
gcc/ada/
* sem_util.adb (Gather_Components): Remove guard for empty list of
components.
if No (Comp_List) or else Null_Present (Comp_List) then
return;
-
- elsif Present (Component_Items (Comp_List)) then
- Comp_Item := First (Component_Items (Comp_List));
-
- else
- Comp_Item := Empty;
end if;
+ Comp_Item := First (Component_Items (Comp_List));
while Present (Comp_Item) loop
-- Skip the tag of a tagged record, as well as all items that are not