]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Improve error for pre/post on generic formal subprogram in Ada 2012 mode
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 24 Jul 2025 08:20:40 +0000 (10:20 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 29 Sep 2025 09:43:40 +0000 (11:43 +0200)
commit4fb2a53f2e161a0e5df410fa0c691e4d708906cf
treeeb2cd79941449d221fb33bf0a5c3c3be17d073bd
parentcc113fac909df3e68a4f445ba307d65c7ba39ea2
ada: Improve error for pre/post on generic formal subprogram in Ada 2012 mode

Instead of saying that pragma placement is illegal, we now say that it
would be legal in Ada 2022.

gcc/ada/ChangeLog:

* sem_prag.adb (Analyze_Pre_Post_Condition): Handle contracts on
generic formal subprograms like on declarations of access-to-subprogram
types.
gcc/ada/sem_prag.adb