]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Reject conditional goto in lock-free protected subprograms
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 3 Oct 2022 14:49:19 +0000 (16:49 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 6 Oct 2022 09:22:49 +0000 (11:22 +0200)
commit1180b8fb8c74da9991a1e1066961d1b3f2bd6e4b
tree0d6ab58d02da29ae1cfbd83133c735e9a5baafa2
parent56a93169a4f413e0a711e973cf34e2ee89151ef4
ada: Reject conditional goto in lock-free protected subprograms

In lock-free protected subprograms we don't allow goto statements;
likewise, we now reject conditional goto statements.

This fix only affects semantic checking mode with switch -gnatc.
In ordinary compilation we already rejected conditional goto after
it was expanded into ordinary goto.

gcc/ada/

* sem_ch9.adb (Allows_Lock_Free_Implementation): Reject
conditional goto statements.
gcc/ada/sem_ch9.adb