diff options
author | Tom Tromey <tromey@adacore.com> | 2023-06-29 08:52:59 -0600 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-07-10 14:41:40 +0200 |
commit | f068a49d95001971e39ab68835e525bb78c65b80 (patch) | |
tree | 0381b655f887e2b7e50a5791db08b6bc41e018ff | |
parent | bcc2c7fa6ed8b7dbb0e3ba11e40958f1b99b83d0 (diff) | |
download | gcc-f068a49d95001971e39ab68835e525bb78c65b80.zip gcc-f068a49d95001971e39ab68835e525bb78c65b80.tar.gz gcc-f068a49d95001971e39ab68835e525bb78c65b80.tar.bz2 |
ada: Add typedefs to snames.h-tmpl
A future patch will change sname.h-tmpl to use enums rather than
preprocessor defines. In order to do this, first introduce some
typedefs that can be used in gcc-interface.
gcc/ada/
* snames.h-tmpl (Name_Id, Attribute_Id, Convention_Id)
(Pragma_Id): New typedefs.
(Get_Attribute_Id, Get_Pragma_Id): Use typedef.
-rw-r--r-- | gcc/ada/snames.h-tmpl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ada/snames.h-tmpl b/gcc/ada/snames.h-tmpl index b15792a..95b3c77 100644 --- a/gcc/ada/snames.h-tmpl +++ b/gcc/ada/snames.h-tmpl @@ -28,6 +28,7 @@ /* Name_Id values */ +typedef Int Name_Id; #define Name_ !! TEMPLATE INSERTION POINT /* Define the function to return one of the numeric values below. Note @@ -35,8 +36,9 @@ than 256 entries is represented that way in Ada. The operand is a Chars field value. */ +typedef Byte Attribute_Id; #define Get_Attribute_Id snames__get_attribute_id -extern unsigned char Get_Attribute_Id (int); +extern Attribute_Id Get_Attribute_Id (int); /* Define the numeric values for attributes. */ @@ -44,6 +46,7 @@ extern unsigned char Get_Attribute_Id (int); /* Define the numeric values for the conventions. */ +typedef Byte Convention_Id; #define Convention_ !! TEMPLATE INSERTION POINT /* Define the function to check if a Name_Id value is a valid pragma */ @@ -56,8 +59,9 @@ extern Boolean Is_Pragma_Name (Name_Id); than 256 entries is represented that way in Ada. The operand is a Chars field value. */ +typedef Byte Pragma_Id; #define Get_Pragma_Id snames__get_pragma_id -extern unsigned char Get_Pragma_Id (int); +extern Pragma_Id Get_Pragma_Id (int); /* Define the numeric values for the pragmas. */ |