[Ada] Refactor nested loops in warning on unassigned out parameter
Pierre-Marie de Rodat
derodat@adacore.com
Thu Dec 2 16:28:43 GMT 2021
For warning about unassigned out parameter we had a loop over all formal
parameters which contained another loop over all formal parameters. This
was inefficient.
Cleanup related to spurious warnings about 'Initialized.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_warn.adb (Warn_On_Unassigned_Out_Parameter): Move inner
loop at the beginning of subprogram, so it is executed only
once; fix order in the "add an ad hoc" phrase.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 2755 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20211202/160458cc/attachment.bin>
More information about the Gcc-patches
mailing list