Commit ae65d635 by Arnaud Charlet

[multiple changes]

2009-07-20  Robert Dewar  <dewar@adacore.com>

	* sem_ch13.adb: Minor reformatting

	* einfo.ads: Minor reformatting
	Component_Bit_Offset is no longer considered obsolescent

2009-07-20  Nicolas Roche  <roche@adacore.com>

	* a-calend.adb: Redefine time_t as signed integer with same size as
	Address type.
	* s-os_lib.ads: Redefine OS_Time as signed integer with same size as
	Address type
	* adaint.h: On Windows 64bits declare OS_Time as long long instead of
	long

2009-07-20  Javier Miranda  <miranda@adacore.com>

	* exp_tss.adb (Init_Proc): Add missing support for non-default C++
	constructors that have anonymous access type formals.

	* sem_res.adb (Resolve_Actuals): Disable checks associated with Ada
	class-wide arguments in case of imported C++ subprograms.

	* exp_ch3.adb (Build_Initialization_Call): Add assertion.

2009-07-20  Sergey Rybin  <rybin@adacore.com>

	* vms_data.ads: Update qualifiers.

From-SVN: r149810
parent 5132708f
2009-07-20 Robert Dewar <dewar@adacore.com> 2009-07-20 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb: Minor reformatting
* einfo.ads: Minor reformatting
Component_Bit_Offset is no longer considered obsolescent
2009-07-20 Nicolas Roche <roche@adacore.com>
* a-calend.adb: Redefine time_t as signed integer with same size as
Address type.
* s-os_lib.ads: Redefine OS_Time as signed integer with same size as
Address type
* adaint.h: On Windows 64bits declare OS_Time as long long instead of
long
2009-07-20 Javier Miranda <miranda@adacore.com>
* exp_tss.adb (Init_Proc): Add missing support for non-default C++
constructors that have anonymous access type formals.
* sem_res.adb (Resolve_Actuals): Disable checks associated with Ada
class-wide arguments in case of imported C++ subprograms.
* exp_ch3.adb (Build_Initialization_Call): Add assertion.
2009-07-20 Sergey Rybin <rybin@adacore.com>
* vms_data.ads: Update qualifiers.
2009-07-20 Robert Dewar <dewar@adacore.com>
* einfo.ads, switch.adb, gnatls.adb, inline.adb, sem_ch13.adb: Minor * einfo.ads, switch.adb, gnatls.adb, inline.adb, sem_ch13.adb: Minor
reformatting reformatting
......
...@@ -1471,7 +1471,9 @@ package body Ada.Calendar is ...@@ -1471,7 +1471,9 @@ package body Ada.Calendar is
subtype long is Long_Integer; subtype long is Long_Integer;
type long_Pointer is access all long; type long_Pointer is access all long;
subtype time_t is long; type time_t is
range -(2 ** (Standard'Address_Size - Integer'(1))) ..
+(2 ** (Standard'Address_Size - Integer'(1)) - 1);
type time_t_Pointer is access all time_t; type time_t_Pointer is access all time_t;
procedure localtime_tzoff procedure localtime_tzoff
......
...@@ -62,7 +62,12 @@ ...@@ -62,7 +62,12 @@
#define STRUCT_STAT struct stat #define STRUCT_STAT struct stat
#endif #endif
typedef long OS_Time; /* Type corresponding to GNAT.OS_Lib.OS_Time */ /* Type corresponding to GNAT.OS_Lib.OS_Time */
#if defined (_WIN64)
typedef long long OS_Time;
#else
typedef long OS_Time;
#endif
extern int __gnat_max_path_len; extern int __gnat_max_path_len;
extern OS_Time __gnat_current_time (void); extern OS_Time __gnat_current_time (void);
......
...@@ -545,12 +545,10 @@ package Einfo is ...@@ -545,12 +545,10 @@ package Einfo is
-- at run-time (this happens if fields of a record have variable -- at run-time (this happens if fields of a record have variable
-- lengths). See package Layout for details of these values. -- lengths). See package Layout for details of these values.
-- --
-- Note: this field is obsolescent, to be eventually replaced entirely -- Note: Component_Bit_Offset is redundant with respect to the fields
-- by Normalized_First_Bit and Normalized_Position, but for the moment, -- Normalized_First_Bit and Normalized_Position, and could in principle
-- gigi is still using (and back annotating) this field, and gigi does -- be eliminated, but it is convenient in several situations, including
-- not know about the new fields. For the front end layout case, the -- use in Gigi, to have this redundant field.
-- Component_Bit_Offset field is only set if it is static, and otherwise
-- the new Normalized_First_Bit and Normalized_Position fields are used.
-- Component_Clause (Node13) -- Component_Clause (Node13)
-- Present in record components and discriminants. If a record -- Present in record components and discriminants. If a record
...@@ -3094,14 +3092,14 @@ package Einfo is ...@@ -3094,14 +3092,14 @@ package Einfo is
-- Packed_Array_Type (Node23) -- Packed_Array_Type (Node23)
-- Present in array types and subtypes, including the string literal -- Present in array types and subtypes, including the string literal
-- subtype case, if the corresponding type is packed (either bit packed -- subtype case, if the corresponding type is packed (either bit packed
-- or packed to eliminate holes in non-contiguous enumeration type -- or packed to eliminate holes in non-contiguous enumeration type index
-- index types). References the type used to represent the packed array, -- types). References the type used to represent the packed array, which
-- which is either a modular type for short static arrays, or an -- is either a modular type for short static arrays, or an array of
-- array of System.Unsigned. Note that in some situations (internal -- System.Unsigned. Note that in some situations (internal types, and
-- types, and references to fields of variant records), it is not -- references to fields of variant records), it is not always possible
-- always possible to construct this type in advance of its use. If -- to construct this type in advance of its use. If Packed_Array_Type
-- Packed_Array_Type is empty, then the necessary type is declared -- is empty, then the necessary type is declared on the fly for each
-- on the fly for each reference to the array. -- reference to the array.
-- Parameter_Mode (synthesized) -- Parameter_Mode (synthesized)
-- Applies to formal parameter entities. This is a synonym for Ekind, -- Applies to formal parameter entities. This is a synonym for Ekind,
...@@ -3109,8 +3107,8 @@ package Einfo is ...@@ -3109,8 +3107,8 @@ package Einfo is
-- is one of E_[In/Out/In_Out]_Parameter) -- is one of E_[In/Out/In_Out]_Parameter)
-- Parent_Subtype (Node19) -- Parent_Subtype (Node19)
-- Present in E_Record_Type. Points to the subtype to use for a -- Present in E_Record_Type. Points to the subtype to use for a field
-- field that references the parent record. -- that references the parent record.
-- Postcondition_Proc (Node8) -- Postcondition_Proc (Node8)
-- Present only in procedure entities, saves the entity of the generated -- Present only in procedure entities, saves the entity of the generated
...@@ -3135,13 +3133,13 @@ package Einfo is ...@@ -3135,13 +3133,13 @@ package Einfo is
-- protected types. Set to the original private component. -- protected types. Set to the original private component.
-- Private_Dependents (Elist18) -- Private_Dependents (Elist18)
-- Present in private (sub)types. Records the subtypes of the -- Present in private (sub)types. Records the subtypes of the private
-- private type, derivations from it, and records and arrays -- type, derivations from it, and records and arrays with components
-- with components dependent on the type. -- dependent on the type.
-- --
-- The subtypes are traversed when installing and deinstalling -- The subtypes are traversed when installing and deinstalling (the full
-- (the full view of) a private type in order to ensure correct -- view of) a private type in order to ensure correct view of the
-- view of the subtypes. -- subtypes.
-- --
-- Used in similar fashion for incomplete types: holds list of subtypes -- Used in similar fashion for incomplete types: holds list of subtypes
-- of these incomplete types that have discriminant constraints. The -- of these incomplete types that have discriminant constraints. The
......
...@@ -1398,6 +1398,7 @@ package body Exp_Ch3 is ...@@ -1398,6 +1398,7 @@ package body Exp_Ch3 is
Proc := Base_Init_Proc (Typ, Entity (Name (Constructor_Ref))); Proc := Base_Init_Proc (Typ, Entity (Name (Constructor_Ref)));
end if; end if;
pragma Assert (Present (Proc));
Init_Type := Etype (First_Formal (Proc)); Init_Type := Etype (First_Formal (Proc));
Full_Init_Type := Underlying_Type (Init_Type); Full_Init_Type := Underlying_Type (Init_Type);
......
...@@ -243,7 +243,19 @@ package body Exp_Tss is ...@@ -243,7 +243,19 @@ package body Exp_Tss is
while Present (E1) and then Present (E2) loop while Present (E1) and then Present (E2) loop
if Chars (E1) /= Chars (E2) if Chars (E1) /= Chars (E2)
or else Ekind (E1) /= Ekind (E2) or else Ekind (E1) /= Ekind (E2)
or else Etype (E1) /= Etype (E2) then
exit;
elsif Ekind (Etype (E1)) /= E_Anonymous_Access_Type
and then Ekind (Etype (E2)) /= E_Anonymous_Access_Type
and then Etype (E1) /= Etype (E2)
then
exit;
elsif Ekind (Etype (E1)) = E_Anonymous_Access_Type
and then Ekind (Etype (E2)) = E_Anonymous_Access_Type
and then Directly_Designated_Type (Etype (E1))
/= Directly_Designated_Type (Etype (E2))
then then
exit; exit;
end if; end if;
......
...@@ -879,7 +879,9 @@ private ...@@ -879,7 +879,9 @@ private
pragma Import (C, Directory_Separator, "__gnat_dir_separator"); pragma Import (C, Directory_Separator, "__gnat_dir_separator");
pragma Import (C, Current_Time, "__gnat_current_time"); pragma Import (C, Current_Time, "__gnat_current_time");
type OS_Time is new Long_Integer; type OS_Time is
range -(2 ** (Standard'Address_Size - Integer'(1))) ..
+(2 ** (Standard'Address_Size - Integer'(1)) - 1);
-- Type used for timestamps in the compiler. This type is used to hold -- Type used for timestamps in the compiler. This type is used to hold
-- time stamps, but may have a different representation than C's time_t. -- time stamps, but may have a different representation than C's time_t.
-- This type needs to match the declaration of OS_Time in adaint.h. -- This type needs to match the declaration of OS_Time in adaint.h.
......
...@@ -2731,7 +2731,6 @@ package body Sem_Ch13 is ...@@ -2731,7 +2731,6 @@ package body Sem_Ch13 is
if Has_Discriminants (Defining_Identifier (Clist)) then if Has_Discriminants (Defining_Identifier (Clist)) then
C2_Ent := C2_Ent :=
First_Discriminant (Defining_Identifier (Clist)); First_Discriminant (Defining_Identifier (Clist));
while Present (C2_Ent) loop while Present (C2_Ent) loop
exit when C1_Ent = C2_Ent; exit when C1_Ent = C2_Ent;
Check_Component_Overlap (C1_Ent, C2_Ent); Check_Component_Overlap (C1_Ent, C2_Ent);
......
...@@ -3662,6 +3662,12 @@ package body Sem_Res is ...@@ -3662,6 +3662,12 @@ package body Sem_Res is
Is_Class_Wide_Type (Etype (Prefix (A))))) Is_Class_Wide_Type (Etype (Prefix (A)))))
and then not Is_Class_Wide_Type (Designated_Type (F_Typ)) and then not Is_Class_Wide_Type (Designated_Type (F_Typ))
and then not Is_Controlling_Formal (F) and then not Is_Controlling_Formal (F)
-- Disable these checks in imported C++ subprograms
and then not (Is_Imported (Entity (Name (N)))
and then Convention (Entity (Name (N)))
= Convention_CPP)
then then
Error_Msg_N Error_Msg_N
("access to class-wide argument not allowed here!", A); ("access to class-wide argument not allowed here!", A);
......
...@@ -6556,6 +6556,14 @@ package VMS_Data is ...@@ -6556,6 +6556,14 @@ package VMS_Data is
-- --
-- Avoid raising PROGRAM_ERROR in the generated program unit stubs. -- Avoid raising PROGRAM_ERROR in the generated program unit stubs.
S_Stub_No_Head : aliased constant S := "/NO_LOCAL_HEADER " &
"--no-local-header";
-- /NONO_LOCAL_HEADER (D)
-- /NO_LOCAL_HEADER
--
-- Do not put local comment header before body stub for a local progran
-- unit
S_Stub_Output : aliased constant S := "/OUTPUT=@" & S_Stub_Output : aliased constant S := "/OUTPUT=@" &
"-o@"; "-o@";
-- /OUTPUT=filespec -- /OUTPUT=filespec
...@@ -6653,6 +6661,7 @@ package VMS_Data is ...@@ -6653,6 +6661,7 @@ package VMS_Data is
S_Stub_Output 'Access, S_Stub_Output 'Access,
S_Stub_Project 'Access, S_Stub_Project 'Access,
S_Stub_No_Exc 'Access, S_Stub_No_Exc 'Access,
S_Stub_No_Head 'Access,
S_Stub_Quiet 'Access, S_Stub_Quiet 'Access,
S_Stub_Search 'Access, S_Stub_Search 'Access,
S_Stub_Subdirs 'Access, S_Stub_Subdirs 'Access,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment