ada: Tune warning about assignment just before a raise statement
commit6b5960e77598c64ea1e5e41e74e4d9a155a95e83
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 2 Mar 2023 14:11:40 +0000 (2 15:11 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 25 May 2023 07:44:15 +0000 (25 09:44 +0200)
tree38c8486eeebc1951dc51c9983673959b2f6ed8fb
parent5bf5aa1bfdb6c090d9d24dc6835aba0005f68fca
ada: Tune warning about assignment just before a raise statement

Tune warning about a possibly ineffective assignment to a formal
parameter that happens just before a raise statement.

The warning is now emitted for parameters of all by-copy types and not
just of scalar types (this gives more warnings), but is suppressed for
aliased parameters (this removes some spurious warnings).

gcc/ada/

* sem_ch11.adb (Analyze_Raise_Expression): Tune warning condition.
* libgnat/g-dirope.ads (Open): Remove a potentially inaccurate comment.
* libgnat/g-dirope.adb (Open): Remove a potentially useless assignment;
the Dir output parameter should be assigned a null value anyway by the
preceding call to Free.
gcc/ada/libgnat/g-dirope.adb
gcc/ada/libgnat/g-dirope.ads
gcc/ada/sem_ch11.adb