summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_prag.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-05 10:29:59 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-05 10:29:59 +0000
commitd32ceaf380038456c115fc3de41bd851780f74ff (patch)
tree27d42a6a40c0b1df7a6ef429c67194c986a05316 /gcc/ada/sem_prag.adb
parent2c786073443f4bc8f339eec69f300ff184e24d38 (diff)
downloadgcc-d32ceaf380038456c115fc3de41bd851780f74ff.tar.gz
2012-12-05 Ed Schonberg <schonberg@adacore.com>
* s-rident.ads, restrict.ads: Remove discrepancies between the documentation on implementation-defined restrictions, and the internal data structure used for warnings and errors on implementation-defined restriction violations. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Chain_PPC): Pre- and postcondition aspects are legal on a subprogram body that acts as a spec. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Find_Selected_Component): If the selector name is an overloadable entity but the name is not overloaded, generate reference to it rather than delaying this until resolution. 2012-12-05 Robert Dewar <dewar@adacore.com> * checks.ads, checks.adb (Activate_Overflow_Check): No effect for MOD/REM/unary + * exp_ch4.adb (Expand_N_Op_Mod): Remove call to set Do_Overflow_Check. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Find_Non_Universal_Interpretation): Use the types of the right operand if the left operand is null. 2012-12-05 Sergey Rybin <rybin@adacore.com frybin> * gnat_ugn.texi, vms_data.ads: document gnatpp -nn option. 2012-12-05 Jose Ruiz <ruiz@adacore.com> * init.c (__gnat_install_handler): For the LEON VxWorks kernel run-time library we need to install a trap handler directly in the trap table (no support by the OS) for the software trap 0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194196 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_prag.adb')
-rw-r--r--gcc/ada/sem_prag.adb8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 2765f10ee09..fa3e066641c 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -2068,6 +2068,14 @@ package body Sem_Prag is
Error_Pragma
("aspect % requires ''Class for null procedure");
+ -- Pre/postconditions are legal on a subprogram body if it is not
+ -- a completion of a declaration.
+
+ elsif Nkind (PO) = N_Subprogram_Body
+ and then Acts_As_Spec (PO)
+ then
+ null;
+
elsif not Nkind_In (PO, N_Subprogram_Declaration,
N_Expression_Function,
N_Generic_Subprogram_Declaration,