[COMMITTED] ada: Remove redundant guards from handling of record components
Checks
Commit Message
From: Piotr Trojanek <trojanek@adacore.com>
Call to First on empty list is intentionally returning Empty.
gcc/ada/
* sem_util.adb (Gather_Components): Remove guard for empty list of
components.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_util.adb | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
@@ -9748,14 +9748,9 @@ package body Sem_Util is
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