[Ada] Disable unwanted warnings in Assertion_Policy(Ignore) mode
authorBob Duff <duff@adacore.com>
Sun, 8 Mar 2020 21:50:49 +0000 (17:50 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 10 Jun 2020 13:35:00 +0000 (09:35 -0400)
commitb9daf13c9350cc02c120971a472092d474d63e8f
treedfccfc4a98120fae5644c202994f1af491dfc4da
parent9c62140e826a5cda62b49ad7712e7bc297ab77f6
[Ada] Disable unwanted warnings in Assertion_Policy(Ignore) mode

2020-06-10  Bob Duff  <duff@adacore.com>

gcc/ada/

* sem_prag.adb (Invariant): Remove the pragma removing code.  It
doesn't work to remove the pragma, because various flags are set
during Build_Invariant_Procedure_Declaration and
Build_Invariant_Procedure_Body that need to be set to avoid the
spurious warnings.
* exp_util.adb (Make_Invariant_Call): Avoid calling the
invariant-checking procedure if the body is empty. This is an
optimization.
gcc/ada/exp_util.adb
gcc/ada/sem_prag.adb