Commit c4c768dd by Arnaud Charlet

[multiple changes]

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
parent 33960e2e
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.
......
......@@ -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
......
......@@ -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- --
......@@ -29,10 +29,8 @@
-- --
------------------------------------------------------------------------------
-- 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;
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
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