@@ -348,17 +348,17 @@ extern void Set_Present_Expr (Node_Id, Uint);
/* sinput: */
struct c_array {
- char *pointer;
+ const char *pointer;
int length;
};
-#define C_Source_Buffer sinput__c_source_buffer
+#define C_Source_Buffer sinput__c_source_buffer
#define Debug_Source_Name sinput__debug_source_name
#define Get_Column_Number sinput__get_column_number
#define Get_Logical_Line_Number sinput__get_logical_line_number
#define Get_Source_File_Index sinput__get_source_file_index
-extern struct c_array C_Source_Buffer (Source_File_Index);
+extern struct c_array C_Source_Buffer (Source_File_Index);
extern File_Name_Type Debug_Source_Name (Source_File_Index);
extern Column_Number_Type Get_Column_Number (Source_Ptr);
extern Line_Number_Type Get_Logical_Line_Number (Source_Ptr);
@@ -3841,7 +3841,7 @@ package body Ch3 is
-- end if;
Set_Subtype_Indication (CompDef_Node, Empty);
- Set_Aliased_Present (CompDef_Node, False);
+ Set_Aliased_Present (CompDef_Node, Aliased_Present);
Set_Access_Definition (CompDef_Node,
P_Access_Definition (Not_Null_Present));
else
@@ -281,10 +281,8 @@ package body Sinput is
---------------------
function C_Source_Buffer (S : SFI) return C_Array is
- use type Interfaces.C.int;
-
- Length : constant Interfaces.C.int :=
- Interfaces.C.int (Source_Last (S) - Source_First (S));
+ Length : constant Integer :=
+ Integer (Source_Last (S) - Source_First (S));
Text : constant Source_Buffer_Ptr := Source_Text (S);
@@ -56,7 +56,6 @@
with Alloc;
with Casing; use Casing;
-with Interfaces.C;
with Namet; use Namet;
with System;
with Table;
@@ -708,12 +707,13 @@ package Sinput is
-- to avoid memory leaks.
type C_Array is record
- Pointer : access constant Character;
- Length : Interfaces.C.int range 0 .. Interfaces.C.int'Last;
- end record with Convention => C_Pass_By_Copy;
+ Pointer : aliased access constant Character;
+ Length : aliased Integer;
+ end record;
+ -- WARNING: There is a matching C declaration of this type in fe.h
- function C_Source_Buffer (S : SFI) return C_Array with
- Export, Convention => C, External_Name => "sinput__c_source_buffer";
+ function C_Source_Buffer (S : SFI) return C_Array;
+ -- WARNING: There is a matching C declaration of this subprogram in fe.h
private
pragma Inline (File_Name);