diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-14 12:37:45 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-14 12:37:45 +0000 |
commit | 44624b501b35f87e0b7cdf3ff5bfa2b5ca164106 (patch) | |
tree | 59847790b25a063269e64e2337b8c480ef42c157 /gcc/ada/exp_prag.adb | |
parent | 9f4e511b8a6be63498ebc88b4fc293ad09ef90ca (diff) | |
download | gcc-44624b501b35f87e0b7cdf3ff5bfa2b5ca164106.tar.gz |
2013-10-14 Robert Dewar <dewar@adacore.com>
* exp_prag.adb (Expand_Pragma_Check): Generate proper string
for invariant
* gnat_rm.texi: Add documentation for pragmas
Type_Invariant[_Class]
* par-prag.adb: Add entries for pragmas Type_Invariant[_Class]
* sem_ch13.adb: Minor reformatting
* sem_prag.adb: Implement pragmas Type_Invariant[_Class]
* snames.ads-tmpl: Add entries for pragmas Type_Invariant[_Class]
2013-10-14 Johannes Kanig <kanig@adacore.com>
* debug.adb: Release now unused debug switches that were only
relevant for gnat2why backend, not the frontend
* frontend.adb (Frontend) Do not stop when -gnatd.H is present,
was unused
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203524 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_prag.adb')
-rw-r--r-- | gcc/ada/exp_prag.adb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ada/exp_prag.adb b/gcc/ada/exp_prag.adb index eeafa72d356..5544e471949 100644 --- a/gcc/ada/exp_prag.adb +++ b/gcc/ada/exp_prag.adb @@ -311,6 +311,10 @@ package body Exp_Prag is -- at" is omitted for name = Assertion, since it is redundant, given -- that the name of the exception is Assert_Failure.) + -- Also, instead of "XXX failed at", we generate slightly + -- different messages for some of the contract assertions (see + -- code below for details). + -- An alternative expansion is used when the No_Exception_Propagation -- restriction is active and there is a local Assert_Failure handler. -- This is not a common combination of circumstances, but it occurs in @@ -400,6 +404,15 @@ package body Exp_Prag is Insert_Str_In_Name_Buffer ("failed ", 1); Add_Str_To_Name_Buffer (" from "); + -- For special case of Invariant, the string is "failed + -- invariant from yy", to be consistent with the string that is + -- generated for the aspect case (the code later on checks for + -- this specific string to modify it in some cases, so this is + -- functionally important). + + elsif Nam = Name_Invariant then + Add_Str_To_Name_Buffer ("failed invariant from "); + -- For all other checks, the string is "xxx failed at yyy" -- where xxx is the check name with current source file casing. |