]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Do not issue a warning on a postcondition of True or False
authorYannick Moy <moy@adacore.com>
Thu, 10 Feb 2022 11:36:52 +0000 (12:36 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 12 May 2022 12:38:39 +0000 (12:38 +0000)
commitcc508db0d323279dc26e8471fd9f727492367e5c
tree153b5c9b6cd4972dead1d523df05cbc6f38b9097
parentce19ac123abde3d9c52d52e13a00bbbe60e08722
[Ada] Do not issue a warning on a postcondition of True or False

Do not issue a warning about the postcondition of a function not
mentioning its result when this postcondition is statically True or
False, as this is a specification of non-termination (for value False)
or a hint to SPARK prover for not inlining an expression function (for
value True). In any case, the warning brings no value here.

gcc/ada/

* sem_util.adb (Check_Result_And_Post_State): Exempt trivial
post.
gcc/ada/sem_util.adb