]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Mon, 20 Jul 2009 12:55:43 +0000 (14:55 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 20 Jul 2009 12:55:43 +0000 (14:55 +0200)
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

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 fb93faffa1da1e7722fb6b534be38e6030b1774b..b0014dbf33e8bef49787f91a6735d4ed623d005a 100644 (file)
@@ -1,3 +1,33 @@
+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
index 05c327db3b336754e6ac8a6052e7b7a2ae46a857..1a49c58888adddc7e27b276fa8904ea412e9e435 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 57cedf8735081e3dc61d8c0d33b9c3d68ba5dfba..f5c283a2228f78dc4b5fbab490a7dfa091f95a23 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 a7023078265e29a366e1c4c5cc9b5eae41b36af5..5fa7194b2ac4f1cfbd55ebf5a75ac8f0554d09bf 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 92bcc03bdabc23fbe89cfa2ebcacf3482c786577..0c55bb32e05fc432d9ef32449fe0e91dbd5bcffe 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 b1a28517948ac3b3325aabb3efbda1e19e1a5bd7..8d27395dddea173634dacdb9623d9697ac583cc5 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 2abce23732e7ae922519c3b244c17eed7a882fb3..b77b3f012666499ac69146243ea88ac173dd66ec 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 7284e0827eda72263d45dec4b38093c6514223f2..40dd75abfea2c13731bff9bd909e32c943aa1e51 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 48fed245fc5cd2e5db33353075d2886fda080f70..e6c4f59def25dcf571cb6d380c9a78e15f826c0a 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 b4ee226c673beee59005eef2668386445eb2b1e8..9302175f37b78588b36ad508982f93c77006a028 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,