diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2020-03-03 12:44:18 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-06-09 04:09:06 -0400 |
commit | fd66407104b2133f0e55deb84db787c692a21948 (patch) | |
tree | 628e3735093268193368896af1156e6831f4cb18 /gcc/ada/exp_ch6.adb | |
parent | 2d6f6e08e69209d3df5b49b738c08ce3e921bf44 (diff) | |
download | gcc-fd66407104b2133f0e55deb84db787c692a21948.zip gcc-fd66407104b2133f0e55deb84db787c692a21948.tar.gz gcc-fd66407104b2133f0e55deb84db787c692a21948.tar.bz2 |
[Ada] Implement AI12-0028: Import of variadic C functions
2020-06-09 Eric Botcazou <ebotcazou@adacore.com>
gcc/ada/
* exp_ch6.adb (Freeze_Subprogram): Deal with convention C_Family.
* freeze.adb (Freeze_Profile): Likewise. Add missing guard.
* sem_mech.adb (Set_Mechanisms): Likewise.
* lib-xref.adb (Output_Import_Export_Info): Ditto for C_Variadic.
* repinfo.adb (List_Subprogram_Info): Likewise.
* sem_prag.adb (Set_Convention_From_Pragma): Move main checks for
Stdcall to...
(Process_Convention): ...here. Add checks for C_Variadic.
* snames.ads-tmpl: Add Name_C_Variadic_0 .. Name_C_Variadic_16.
Use consistent format for subtype declarations.
(Convention_Id): Add Convention_C_Variadic_0 .. C_Variadic_16
and move Convention_CPP up.
(Convention_C_Family): New subtype of Convention_Id.
(Convention_C_Variadic): Likewise.
(Foreign_Convention): Use explicit upper bound.
Add pragma Inline for Is_Configuration_Pragma_Name,
Is_Function_Attribute_Name, Is_Internal_Attribute_Name
and Is_Procedure_Attribute_Name.
* snames.adb-tmpl (Get_Convention_Id): Deal with Name_Variadic_n.
(Get_Convention_Name): Deal with Convention_Variadic_n.
* types.h (Convention_Id): New typedef.
* xsnamest.adb (Name2): New variable.
(Is_Conv): New pattern.
(Get_Subt1): Likewise.
(Get_Subt2): Likewise.
Output subtypes of Convention_Id into the C header file.
Diffstat (limited to 'gcc/ada/exp_ch6.adb')
-rw-r--r-- | gcc/ada/exp_ch6.adb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index e948580..5a0cbf4 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -7716,8 +7716,7 @@ package body Exp_Ch6 is -- Build_Inherit_Prims takes care of initializing these slots. elsif Is_Imported (Subp) - and then (Convention (Subp) = Convention_CPP - or else Convention (Subp) = Convention_C) + and then Convention (Subp) in Convention_C_Family then null; |