diff options
author | Ed Schonberg <schonberg@adacore.com> | 2008-08-01 11:03:23 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-08-01 11:03:23 +0200 |
commit | 14037bbc9c7d2229754399f96ad6fa2cb6ee6161 (patch) | |
tree | 046c01c8d47e6a5aa0b78b8f8fe6922d1f9515a9 /gcc | |
parent | 8045c479546de9d456e1be06d8d8f1dbc922684f (diff) | |
download | gcc-14037bbc9c7d2229754399f96ad6fa2cb6ee6161.zip gcc-14037bbc9c7d2229754399f96ad6fa2cb6ee6161.tar.gz gcc-14037bbc9c7d2229754399f96ad6fa2cb6ee6161.tar.bz2 |
2008-08-01 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb:
(Check_Precondition_Postcondition): If not generating code, analyze the
expression in a postcondition that appears in a subprogram body, so that
it is properly decorated for ASIS use.
From-SVN: r138489
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_prag.adb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index b54cda6..99f9f8f 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -1451,6 +1451,15 @@ package body Sem_Prag is if Nkind (Parent (N)) = N_Subprogram_Body and then List_Containing (N) = Declarations (Parent (N)) then + if Operating_Mode /= Generate_Code then + + -- Analyze expression in pragma, for correctness + -- and for ASIS use. + + Preanalyze_Spec_Expression + (Get_Pragma_Arg (Arg1), Standard_Boolean); + end if; + In_Body := True; return; |