diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-09 09:57:00 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-09 09:57:00 +0000 |
commit | 13ba2c65bca1a5bbb7f9aff4e344d4f30d1a6981 (patch) | |
tree | 3d96305a5fd5eb104053e32acb56c0321908d12f /gcc/ada/restrict.ads | |
parent | eb704cc67bb5590d3e81d7884cdfd7d8cf7d0c60 (diff) | |
download | gcc-13ba2c65bca1a5bbb7f9aff4e344d4f30d1a6981.tar.gz |
2010-09-09 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb, sem_ch6.adb, exp_ch3.adb: Minor reformatting.
2010-09-09 Robert Dewar <dewar@adacore.com>
* einfo.adb (Is_Aggregate_Type): New function.
* einfo.ads (Aggregate_Kind): New enumeration subtype
(Is_Aggregate_Type): New function.
* sem_type.adb (Is_Array_Class_Record_Type): Removed, replaced by
Is_Aggregate_Typea.
2010-09-09 Robert Dewar <dewar@adacore.com>
* exp_ch11.adb, frontend.adb, sem_attr.adb, sem_ch10.adb, sem_ch3.adb,
sem_ch4.adb, sem_ch9.adb, sem_res.adb: Use Restriction_Check_Needed
where appropriate.
* restrict.ads, restrict.adb: Ditto.
(Restriction_Check_Needed): New function
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164061 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/restrict.ads')
-rw-r--r-- | gcc/ada/restrict.ads | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ada/restrict.ads b/gcc/ada/restrict.ads index ecac63cff7d..50d5427895c 100644 --- a/gcc/ada/restrict.ads +++ b/gcc/ada/restrict.ads @@ -292,7 +292,19 @@ package Restrict is -- used where the compiled code depends on whether the restriction is -- active. Always use Check_Restriction to record a violation. Note that -- this returns False if we only have a Restriction_Warnings set, since - -- restriction warnings should never affect generated code. + -- restriction warnings should never affect generated code. If you want + -- to know if a call to Check_Restriction is needed then use the function + -- Restriction_Check_Required instead. + + function Restriction_Check_Required (R : All_Restrictions) return Boolean; + pragma Inline (Restriction_Check_Required); + -- Determines if either a Restriction_Warnings or Restrictions pragma has + -- been given for the specified restriction. If true, then a subsequent + -- call to Check_Restriction is required if the restriction is violated. + -- This must not be used to guard code generation that depends on whether + -- a restriction is active (see Restriction_Active above). Typically it + -- is used to avoid complex code to determine if a restriction is violated, + -- executing this code only if needed. function Restricted_Profile return Boolean; -- Tests if set of restrictions corresponding to Profile (Restricted) is |