aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gen_il-fields.ads
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2024-07-03 18:24:37 +0200
committerMarc Poulhiès <dkm@gcc.gnu.org>2024-08-02 09:08:04 +0200
commit3067fdd87bfb5666460094ce9b783deb7b643145 (patch)
tree5ab4a04fa48841caf7dff3d6e32529b5f75cf4dd /gcc/ada/gen_il-fields.ads
parentdc72d4dca9e6ee5af2ea2af0353a994a7a109db3 (diff)
downloadgcc-3067fdd87bfb5666460094ce9b783deb7b643145.zip
gcc-3067fdd87bfb5666460094ce9b783deb7b643145.tar.gz
gcc-3067fdd87bfb5666460094ce9b783deb7b643145.tar.bz2
ada: Implement No_Raise aspect & pragma on subprograms
The new aspect is automatically set on the Adjust and Finalize primitives of finalizable types, unless Relaxed_Finalization is explicitly set to False, but it can also be specified directly on subprograms. It is also available in earlier versions of the language by means of the associated pragma. gcc/ada/ * aspects.ads (Aspect_Id): Add Aspect_No_Raise identifier. (Implementation_Defined_Aspect): Add True for Aspect_No_Raise. (Is_Representation_Aspect): Add False for Aspect_No_Raise. (Aspect_Names): Add Name_No_Raise for Aspect_No_Raise. (Aspect_Delay): Add Always_Delay for Aspect_No_Raise. * checks.ads (Raise_Checks_Suppressed): New function. (Apply_Raise_Check): New procedure. * checks.adb (Apply_Raise_Check): New procedure. (Raise_Checks_Suppressed): New function. * doc/gnat_rm/gnat_language_extensions.rst (Generalized Finalization): Update. * doc/gnat_rm/implementation_defined_aspects.rst (No_Raise): New. * doc/gnat_rm/implementation_defined_characteristics.rst (Check names): Document Raise_Check and alphabetize others. * doc/gnat_rm/implementation_defined_pragmas.rst (No_Raise): New. * einfo.ads (No_Raise): New flag defined in subprograms and generic subprograms. * exp_ch6.adb (Expand_N_Subprogram_Body): Call Apply_Raise_Check at the end of the processing. * exp_ch11.adb (Get_RT_Exception_Name): Add alternative for PE_Raise_Check_Failed to case statement. * gen_il-fields.ads (Opt_Field_Enum): Add No_Raise identifier. * gen_il-gen-gen_entities.adb (Subprogram_Kind): Add No_Raise as semantical flag. (Generic_Subprogram_Kind): Likewise. * par-prag.adb (Prag): Add alternative for Pragma_No_Raise to case statement. * sem_ch13.adb (Validate_Finalizable_Aspect): Set No_Raise on the Adjust and Finalize primitives if Relaxed_Finalization is set. * sem_prag.adb (Analyze_Pragma): Add alternative for Pragma_No_Raise to case statement. (Sig_Flag): Add 0 for Pragma_No_Raise. * snames.ads-tmpl (Remaining pragma names): Add Name_No_Raise. (Names of recognized checks): Add Name_Raise_Check. (Pragma_Id): Add Pragma_No_Raise identifier. * types.ads (Raise_Check): New named number. (All_Checks): Adjust. (RT_Exception_Code): Add PE_Raise_Check_Failed identifier. (Rkind): Add PE_Reason for PE_Raise_Check_Failed and alphabetize. * types.h (RT_Exception_Code): Add PE_Raise_Check_Failed as 38. (LAST_REASON_CODE): Adjust. * libgnat/a-except.adb (Rcheck_PE_Raise_Check): New procedure with pragmas Export, No_Return and Machine_Attributes. (Rmsg_38): New string constant. * gnat_rm.texi: Regenerate.
Diffstat (limited to 'gcc/ada/gen_il-fields.ads')
-rw-r--r--gcc/ada/gen_il-fields.ads1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/gen_il-fields.ads b/gcc/ada/gen_il-fields.ads
index a3e85ac..520ea55 100644
--- a/gcc/ada/gen_il-fields.ads
+++ b/gcc/ada/gen_il-fields.ads
@@ -825,6 +825,7 @@ package Gen_IL.Fields is
No_Dynamic_Predicate_On_Actual,
No_Pool_Assigned,
No_Predicate_On_Actual,
+ No_Raise,
No_Reordering,
No_Return,
No_Strict_Aliasing,