diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2023-02-28 10:36:54 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-05-23 09:59:07 +0200 |
commit | 47a084d96bb880d9c33b6be04aad883f1da2ad62 (patch) | |
tree | a5f3cbfa05b65564b8916d0ea0a94e06ab956a73 /gcc/ada/inline.adb | |
parent | ac243c845a2049c3e302a8ae81a01b53b467a2ff (diff) | |
download | gcc-47a084d96bb880d9c33b6be04aad883f1da2ad62.zip gcc-47a084d96bb880d9c33b6be04aad883f1da2ad62.tar.gz gcc-47a084d96bb880d9c33b6be04aad883f1da2ad62.tar.bz2 |
ada: Cleanup inconsistent iteration over exception handlers
When detecting duplicate choices in exception handlers we had
inconsistent pairs of First/Next_Non_Pragma and First_Non_Pragma/Next.
This was harmless, because exception choices don't allow pragmas at all,
e.g.:
when Program_Error | Constraint_Error | ...; -- pragma not allowed
and exception handlers only allow pragmas to appear as the first item
on the list, e.g.:
exception
pragma Inspection_Point; -- first item on the list of handlers
when Program_Error =>
<statements>
pragma Inspection_Point; -- last item on the list of statements
when Constraint_Error =>
...
However, it still seems cleaner to have consistent pairs of First/Next
and First_Non_Pragma/Next_Non_Pragma.
gcc/ada/
* sem_ch11.adb
(Check_Duplication): Fix inconsistent iteration.
(Others_Present): Iterate over handlers using First_Non_Pragma and
Next_Non_Pragma just like in Check_Duplication.
Diffstat (limited to 'gcc/ada/inline.adb')
0 files changed, 0 insertions, 0 deletions