OSDN Git Service

2009-07-20 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 Jul 2009 12:55:43 +0000 (12:55 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 Jul 2009 12:55:43 +0000 (12:55 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149810 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/a-calend.adb
gcc/ada/adaint.h
gcc/ada/einfo.ads
gcc/ada/exp_ch3.adb
gcc/ada/exp_tss.adb
gcc/ada/s-os_lib.ads
gcc/ada/sem_ch13.adb
gcc/ada/sem_res.adb
gcc/ada/vms_data.ads

index fb93faf..b0014db 100644 (file)
@@ -1,5 +1,35 @@
 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
        reformatting
 
index 05c327d..1a49c58 100644 (file)
@@ -1471,7 +1471,9 @@ package body Ada.Calendar is
       subtype long is Long_Integer;
       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;
 
       procedure localtime_tzoff
index 57cedf8..f5c283a 100644 (file)
 #define STRUCT_STAT struct stat
 #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 OS_Time __gnat_current_time                (void);
index a702307..5fa7194 100644 (file)
@@ -545,12 +545,10 @@ package Einfo is
 --       at run-time (this happens if fields of a record have variable
 --       lengths). See package Layout for details of these values.
 --
---       Note: this field is obsolescent, to be eventually replaced entirely
---       by Normalized_First_Bit and Normalized_Position, but for the moment,
---       gigi is still using (and back annotating) this field, and gigi does
---       not know about the new fields. For the front end layout case, the
---       Component_Bit_Offset field is only set if it is static, and otherwise
---       the new Normalized_First_Bit and Normalized_Position fields are used.
+--       Note: Component_Bit_Offset is redundant with respect to the fields
+--       Normalized_First_Bit and Normalized_Position, and could in principle
+--       be eliminated, but it is convenient in several situations, including
+--       use in Gigi, to have this redundant field.
 
 --    Component_Clause (Node13)
 --       Present in record components and discriminants. If a record
@@ -3094,14 +3092,14 @@ package Einfo is
 --    Packed_Array_Type (Node23)
 --       Present in array types and subtypes, including the string literal
 --       subtype case, if the corresponding type is packed (either bit packed
---       or packed to eliminate holes in non-contiguous enumeration type
---       index types). References the type used to represent the packed array,
---       which is either a modular type for short static arrays, or an
---       array of System.Unsigned. Note that in some situations (internal
---       types, and references to fields of variant records), it is not
---       always possible to construct this type in advance of its use. If
---       Packed_Array_Type is empty, then the necessary type is declared
---       on the fly for each reference to the array.
+--       or packed to eliminate holes in non-contiguous enumeration type index
+--       types). References the type used to represent the packed array, which
+--       is either a modular type for short static arrays, or an array of
+--       System.Unsigned. Note that in some situations (internal types, and
+--       references to fields of variant records), it is not always possible
+--       to construct this type in advance of its use. If Packed_Array_Type
+--       is empty, then the necessary type is declared on the fly for each
+--       reference to the array.
 
 --    Parameter_Mode (synthesized)
 --       Applies to formal parameter entities. This is a synonym for Ekind,
@@ -3109,8 +3107,8 @@ package Einfo is
 --       is one of E_[In/Out/In_Out]_Parameter)
 
 --    Parent_Subtype (Node19)
---       Present in E_Record_Type. Points to the subtype to use for a
---       field that references the parent record.
+--       Present in E_Record_Type. Points to the subtype to use for a field
+--       that references the parent record.
 
 --    Postcondition_Proc (Node8)
 --       Present only in procedure entities, saves the entity of the generated
@@ -3135,13 +3133,13 @@ package Einfo is
 --       protected types. Set to the original private component.
 
 --    Private_Dependents (Elist18)
---       Present in private (sub)types. Records the subtypes of the
---       private type, derivations from it, and records and arrays
---       with components dependent on the type.
+--       Present in private (sub)types. Records the subtypes of the private
+--       type, derivations from it, and records and arrays with components
+--       dependent on the type.
 --
---       The subtypes are traversed when installing and deinstalling
---       (the full view of) a private type in order to ensure correct
---       view of the subtypes.
+--       The subtypes are traversed when installing and deinstalling (the full
+--       view of) a private type in order to ensure correct view of the
+--       subtypes.
 --
 --       Used in similar fashion for incomplete types: holds list of subtypes
 --       of these incomplete types that have discriminant constraints. The
index 92bcc03..0c55bb3 100644 (file)
@@ -1398,6 +1398,7 @@ package body Exp_Ch3 is
          Proc := Base_Init_Proc (Typ, Entity (Name (Constructor_Ref)));
       end if;
 
+      pragma Assert (Present (Proc));
       Init_Type      := Etype (First_Formal (Proc));
       Full_Init_Type := Underlying_Type (Init_Type);
 
index b1a2851..8d27395 100644 (file)
@@ -243,7 +243,19 @@ package body Exp_Tss is
                while Present (E1) and then Present (E2) loop
                   if Chars (E1) /= Chars (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
                      exit;
                   end if;
index 2abce23..b77b3f0 100755 (executable)
@@ -879,7 +879,9 @@ private
    pragma Import (C, Directory_Separator, "__gnat_dir_separator");
    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
    --  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.
index 7284e08..40dd75a 100644 (file)
@@ -2731,7 +2731,6 @@ package body Sem_Ch13 is
                      if Has_Discriminants (Defining_Identifier (Clist)) then
                         C2_Ent :=
                           First_Discriminant (Defining_Identifier (Clist));
-
                         while Present (C2_Ent) loop
                            exit when C1_Ent = C2_Ent;
                            Check_Component_Overlap (C1_Ent, C2_Ent);
index 48fed24..e6c4f59 100644 (file)
@@ -3662,6 +3662,12 @@ package body Sem_Res is
                                   Is_Class_Wide_Type (Etype (Prefix (A)))))
               and then not Is_Class_Wide_Type (Designated_Type (F_Typ))
               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
                Error_Msg_N
                  ("access to class-wide argument not allowed here!", A);
index b4ee226..9302175 100644 (file)
@@ -6556,6 +6556,14 @@ package VMS_Data is
    --
    --  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=@"                      &
                                             "-o@";
    --        /OUTPUT=filespec
@@ -6653,6 +6661,7 @@ package VMS_Data is
                       S_Stub_Output     'Access,
                       S_Stub_Project    'Access,
                       S_Stub_No_Exc     'Access,
+                      S_Stub_No_Head    'Access,
                       S_Stub_Quiet      'Access,
                       S_Stub_Search     'Access,
                       S_Stub_Subdirs    'Access,