From 2f31b36248da8d0a895f2535d9c5e251b5e4595e Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 16 Dec 2019 10:34:12 +0000 Subject: [Ada] Export the Ada version through the C interface 2019-12-16 Eric Botcazou gcc/ada/ * fe.h (Ada_Version_Type): New typedef. (Ada_Version): Declare. * opt.ads (Ada_Version_Type): Add Convention C and WARNING line. (Ada_Version): Add WARNING line. (Exception_Mechanism_Type): Likewise. From-SVN: r279426 --- gcc/ada/fe.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc/ada/fe.h') diff --git a/gcc/ada/fe.h b/gcc/ada/fe.h index 74eb2ad..6b3f300 100644 --- a/gcc/ada/fe.h +++ b/gcc/ada/fe.h @@ -36,7 +36,7 @@ "WARNING: There is a matching C declaration of this in fe.h" - where is either "subprogram" or "variable". + where is either "subprogram" or "variable" or "type". WARNING: functions taking String_Pointer parameters must abide by the rule documented alongside the definition of String_Pointer in types.h. */ @@ -187,6 +187,7 @@ extern Boolean In_Extended_Main_Code_Unit (Entity_Id); /* opt: */ +#define Ada_Version opt__ada_version #define Back_End_Inlining opt__back_end_inlining #define Debug_Generated_Code opt__debug_generated_code #define Exception_Extra_Info opt__exception_extra_info @@ -199,9 +200,14 @@ extern Boolean In_Extended_Main_Code_Unit (Entity_Id); #define Suppress_Checks opt__suppress_checks typedef enum { + Ada_83, Ada_95, Ada_2005, Ada_2012, Ada_2020 +} Ada_Version_Type; + +typedef enum { Front_End_SJLJ, Back_End_ZCX, Back_End_SJLJ } Exception_Mechanism_Type; +extern Ada_Version_Type Ada_Version; extern Boolean Back_End_Inlining; extern Boolean Debug_Generated_Code; extern Boolean Exception_Extra_Info; -- cgit v1.1