[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Tue, 15 May 2012 09:34:10 +0000 (11:34 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 15 May 2012 09:34:10 +0000 (11:34 +0200)
2012-05-15  Geert Bosch  <bosch@adacore.com>

* sem_ch9.adb (Allows_Lock_Free_Implementation): out or in out
parameters can be access types as well, not just scalar types,
so relax the test to Is_Elementary_Type.

2012-05-15  Bob Duff  <duff@adacore.com>

* s-atacco.ads s-atacco.adb: Replace pragma Elaborate_Body
with pragma No_Body.
(Xyz): Remove Xyz, which is apparently unnecessary.

2012-05-15  Tristan Gingold  <gingold@adacore.com>

* a-calend-vms.adb: Complete previous change.

2012-05-15  Bob Duff  <duff@adacore.com>

* s-win32.ads: Minor comment fix.
* s-osprim-mingw.adb: Minor editing.

From-SVN: r187508

gcc/ada/ChangeLog
gcc/ada/a-calend-vms.adb
gcc/ada/s-atacco.adb
gcc/ada/s-atacco.ads
gcc/ada/s-osprim-mingw.adb
gcc/ada/s-win32.ads
gcc/ada/sem_ch9.adb

index 7091154a823edd49444e8a54ffff810444a8eb73..33d66c63018cee1c78cf7e592de058cb5ab58623 100644 (file)
@@ -1,3 +1,24 @@
+2012-05-15  Geert Bosch  <bosch@adacore.com>
+
+       * sem_ch9.adb (Allows_Lock_Free_Implementation): out or in out
+       parameters can be access types as well, not just scalar types,
+       so relax the test to Is_Elementary_Type.
+
+2012-05-15  Bob Duff  <duff@adacore.com>
+
+       * s-atacco.ads s-atacco.adb: Replace pragma Elaborate_Body
+       with pragma No_Body.
+       (Xyz): Remove Xyz, which is apparently unnecessary.
+
+2012-05-15  Tristan Gingold  <gingold@adacore.com>
+
+       * a-calend-vms.adb: Complete previous change.
+
+2012-05-15  Bob Duff  <duff@adacore.com>
+
+       * s-win32.ads: Minor comment fix.
+       * s-osprim-mingw.adb: Minor editing.
+
 2012-05-15  Robert Dewar  <dewar@adacore.com>
 
        * exp_ch9.adb, sem_ch9.adb, sem_ch13.adb: Minor reformatting.
index bb8faaf9790a325a414c3e45846dc599c91eab80..dc7c23e75328fb2d5504276a07bd7e87daff0319 100644 (file)
@@ -915,8 +915,19 @@ package body Ada.Calendar is
          --  Step 1: Split the input time
 
          Formatting_Operations.Split
-           (T, Year, Month, tm_day, Day_Secs,
-            tm_hour, tm_min, Second, Sub_Sec, Leap_Sec, True, 0);
+           (Date        => T,
+            Year        => Year,
+            Month       => Month,
+            Day         => tm_day,
+            Day_Secs    => Day_Secs,
+            Hour        => tm_hour,
+            Minute      => tm_min,
+            Second      => Second,
+            Sub_Sec     => Sub_Sec,
+            Leap_Sec    => Leap_Sec,
+            Use_TZ      => True,
+            Is_Historic => False,
+            Time_Zone   => 0);
 
          --  Step 2: Correct the year and month
 
index ccd5ffd5a475aa6deaa2b808b7d5c0ef54449bc4..f1998fa71f83cd1615f3f3e54ebf59f7a1ec980c 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2009 Free Software Foundation, Inc.          --
+--          Copyright (C) 1992-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
 --                                                                          --
 ------------------------------------------------------------------------------
 
---  This is a dummy version of this package that is needed to solve bootstrap
---  problems when compiling a library that doesn't require s-atacco.adb from
---  a compiler that contains one.
+--  This package does not require a body, since it is a package renaming. We
+--  provide a dummy file containing a No_Body pragma so that previous versions
+--  of the body (which did exist) will not interfere.
 
-package body System.Address_To_Access_Conversions is
-
-end System.Address_To_Access_Conversions;
+pragma No_Body;
index 031240ed8a3e4804476ce56582a65aa297b1ce19..fb6232d14ae44e6425734e114721694917bfd91e 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2009, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -38,24 +38,12 @@ generic
 
 package System.Address_To_Access_Conversions is
    pragma Preelaborate;
-   pragma Elaborate_Body;
-   --  This pragma Elaborate_Body is there to ensure the requirement of what is
-   --  at the moment a dummy null body. The reason this null body is there is
-   --  that we used to have a real body, and it causes bootstrap problems with
-   --  old compilers if we try to remove the corresponding file.
 
    pragma Compile_Time_Warning
      (Object'Unconstrained_Array,
       "Object is unconstrained array type" & ASCII.LF &
       "To_Pointer results may not have bounds");
 
-   --  Capture constrained status, suppressing warnings, since this is
-   --  an obsolescent feature to use Constrained in this way (RM J.4).
-
-   pragma Warnings (Off);
-   Xyz : Boolean := Object'Constrained;
-   pragma Warnings (On);
-
    type Object_Pointer is access all Object;
    for Object_Pointer'Size use Standard'Address_Size;
 
index 6c05b524fb53c4adf8d3377b4596fd3a9fce1987..a658f71f318c39eedff76925071de22bbd759bca 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1998-2009, Free Software Foundation, Inc.         --
+--          Copyright (C) 1998-2012, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNARL is free software; you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -50,9 +50,6 @@ package body System.OS_Primitives is
    --  libgnarl.dll. The indirection level introduced here has no measurable
    --  penalties.
 
-   --  Note that access variables below must not be declared as constant
-   --  otherwise the compiler optimization will remove this indirect access.
-
    type DA is access all Duration;
    --  Use to have indirect access to multi-word variables
 
@@ -129,9 +126,9 @@ package body System.OS_Primitives is
                   Long_Long_Float (TFA.all));
 
       --  If we have a shift of more than Max_Shift seconds we resynchronize
-      --  the Clock. This is probably due to a manual Clock adjustment, an
-      --  DST adjustment or an NTP synchronisation. And we want to adjust the
-      --  time for this system (non-monotonic) clock.
+      --  the Clock. This is probably due to a manual Clock adjustment, a DST
+      --  adjustment or an NTP synchronisation. And we want to adjust the time
+      --  for this system (non-monotonic) clock.
 
       if abs (Elap_Secs_Sys - Elap_Secs_Tick) > Max_Shift then
          Get_Base_Time;
@@ -179,7 +176,7 @@ package body System.OS_Primitives is
       --  a performance counter which has a better precision than the Win32
       --  time API.
 
-      --  Try at most 10th times to reach the best synchronisation (below 1
+      --  Try at most 10 times to reach the best synchronisation (below 1
       --  millisecond) otherwise the runtime will use the best value reached
       --  during the runs.
 
@@ -239,6 +236,7 @@ package body System.OS_Primitives is
    function Monotonic_Clock return Duration is
       Current_Ticks  : aliased LARGE_INTEGER;
       Elap_Secs_Tick : Duration;
+
    begin
       if QueryPerformanceCounter (Current_Ticks'Access) = Win32.FALSE then
          return 0.0;
index 37a6f3d604272b59564bb11a93209846625f3db8..d3343252f16f809dbf1995b43dc12387528f705b 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2008-2009, Free Software Foundation, Inc.          --
+--         Copyright (C) 2008-2012, Free Software Foundation, Inc.          --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -46,7 +46,7 @@ package System.Win32 is
    --  The LARGE_INTEGER type is actually a fixed point type
    --  that only can represent integers. The reason for this is
    --  easier conversion to Duration or other fixed point types.
-   --  (See Operations.Clock)
+   --  (See System.OS_Primitives.Clock, mingw and rtx versions.)
 
    type LARGE_INTEGER is delta 1.0 range -2.0**63 .. 2.0**63 - 1.0;
 
index 7ce20b5f85c322e27a185664f7aafaef864d8c2a..76db08c5e4fbfecf97351275612afcecfe739776 100644 (file)
@@ -82,7 +82,7 @@ package body Sem_Ch9 is
    --            May reference only one protected component
    --            May not reference non-constant entities outside the protected
    --              subprogram scope.
-   --            May not reference non-scalar out parameters
+   --            May not reference non-elementary out parameters
    --            May not contain loop statements or procedure calls
    --            Function calls and attribute references must be static
    --
@@ -306,7 +306,7 @@ package body Sem_Ch9 is
 
                         elsif Ekind_In (Id, E_Out_Parameter,
                                             E_In_Out_Parameter)
-                          and then not Is_Scalar_Type (Etype (Id))
+                          and then not Is_Elementary_Type (Etype (Id))
                           and then Scope_Within_Or_Same (Scope (Id), Sub_Id)
                         then
                            return Abandon;