[COMMITTED] ada: Remove redundant protection against empty lists

2023-05-29 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Calls to First on No_List intentionally return Empty, so explicit guards against No_List are unnecessary. Code cleanup; semantics is unaffected. gcc/ada/ * sem_util.adb (Check_Function_Writable_Actuals): Remove guard against a membership test with no alterna

[COMMITTED] ada: Remove redundant protection against empty lists

2023-05-26 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Calls to Length on No_List intentionally return 0, so explicit guards against No_List are unnecessary. Code cleanup; semantics is unaffected. gcc/ada/ * sem_ch13.adb (Check_Component_List): Local variable Compl is now a constant; a nested block is no longer

[COMMITTED] ada: Remove redundant protection against empty lists

2023-05-22 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Calls to List_Length on No_List intentionally return 0 (and likewise call to First on No_List intentionally return Empty), so explicit guards against No_List are unnecessary. Code cleanup; semantics is unaffected. gcc/ada/ * exp_aggr.adb (Aggregate_Size): Remove red

[COMMITTED] ada: Remove redundant protection against empty lists

2023-05-15 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Calls to First on No_List intentionally return Empty node, so explicit guards against No_List are unnecessary. Code cleanup; semantics is unaffected. gcc/ada/ * sem_util.adb (New_Copy_Tree): Remove redundant calls to Present. Tested on x86_64-pc-linux-gnu, committe

[Ada] Remove redundant protection against empty lists

2022-07-05 Thread Pierre-Marie de Rodat via Gcc-patches
Calls to First on No_List intentionally return Empty node, so explicit guards against No_List are unnecessary. Code cleanup; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_code.adb (Setup_Asm_IO_Args): Remove guard against No_List. * par