mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-25 07:00:35 +08:00
[multiple changes]
2014-01-20 Robert Dewar <dewar@adacore.com> * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads: Minor reformatting and code clean up. 2014-01-20 Arnaud Charlet <charlet@adacore.com> * sem_cat.adb (Validate_Object_Declaration): Relax semantics of objects of private type if Relaxed_RM_Semantics. From-SVN: r206823
This commit is contained in:
parent
2838fa930c
commit
90b51aaf63
@ -1,3 +1,13 @@
|
||||
2014-01-20 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
|
||||
Minor reformatting and code clean up.
|
||||
|
||||
2014-01-20 Arnaud Charlet <charlet@adacore.com>
|
||||
|
||||
* sem_cat.adb (Validate_Object_Declaration): Relax semantics
|
||||
of objects of private type if Relaxed_RM_Semantics.
|
||||
|
||||
2014-01-20 Claire Dross <dross@adacore.com>
|
||||
|
||||
* a-cofove.ads (Vector): Capacity discriminant
|
||||
|
@ -13820,7 +13820,7 @@ identifier case conventions, rules of indentation, and comment layout.
|
||||
Note: A newly-redesigned set of formatting algorithms used by gnatpp
|
||||
is now available.
|
||||
To invoke the old formatting algorithms, use the @option{--pp-old} switch.
|
||||
We intend to remove support for @option{--pp-old} at some point.
|
||||
Support for @option{--pp-old} will be removed in some future version.
|
||||
|
||||
To produce a reformatted file, @command{gnatpp} generates and uses the ASIS
|
||||
tree for the input source and thus requires the input to be syntactically and
|
||||
|
@ -81,7 +81,7 @@ package System.Tasking.Async_Delays is
|
||||
-- abort_undefer.all;
|
||||
-- end;
|
||||
-- end if;
|
||||
--
|
||||
|
||||
-- if Timed_Out (DB'Unchecked_Access) then
|
||||
-- ...continuation for timeout case...
|
||||
-- end if;
|
||||
@ -108,9 +108,8 @@ package System.Tasking.Async_Delays is
|
||||
pragma Inline (Timed_Out);
|
||||
-- Return True if the delay specified in D has timed out
|
||||
|
||||
-- There are child units for delays on Ada.Calendar.Time and
|
||||
-- Ada.Real_Time.Time, so that an application will not need to link in
|
||||
-- features that is not using.
|
||||
-- There are child units for delays on Ada.Calendar.Time/Ada.Real_Time.Time
|
||||
-- so that an application need not link in features that it is not using.
|
||||
|
||||
private
|
||||
|
||||
@ -119,11 +118,10 @@ private
|
||||
-- ID of the calling task
|
||||
|
||||
Level : ATC_Level_Base;
|
||||
-- Normally Level is the ATC nesting level of the
|
||||
-- async. select statement to which this delay belongs, but
|
||||
-- after a call has been dequeued we set it to
|
||||
-- ATC_Level_Infinity so that the Cancel operation can
|
||||
-- detect repeated calls, and act idempotently.
|
||||
-- Normally Level is the ATC nesting level of the asynchronous select
|
||||
-- statement to which this delay belongs, but after a call has been
|
||||
-- dequeued we set it to ATC_Level_Infinity so that the Cancel operation
|
||||
-- can detect repeated calls, and act idempotently.
|
||||
|
||||
Resume_Time : Duration;
|
||||
-- The absolute wake up time, represented as Duration
|
||||
@ -135,16 +133,15 @@ private
|
||||
-- A double linked list
|
||||
end record;
|
||||
|
||||
-- The above "overlaying" of Self_ID and Level to hold other
|
||||
-- data that has a non-overlapping lifetime is an unabashed
|
||||
-- hack to save memory.
|
||||
-- The above "overlaying" of Self_ID and Level to hold other data that has
|
||||
-- a non-overlapping lifetime is an unabashed hack to save memory.
|
||||
|
||||
procedure Time_Enqueue
|
||||
(T : Duration;
|
||||
D : Delay_Block_Access);
|
||||
pragma Inline (Time_Enqueue);
|
||||
-- Used by the child units to enqueue delays on the timer queue
|
||||
-- implemented in the body of this package. T denotes a point in time as
|
||||
-- the duration elapsed since the epoch of the Ada real-time clock.
|
||||
-- Used by the child units to enqueue delays on the timer queue implemented
|
||||
-- in the body of this package. T denotes a point in time as the duration
|
||||
-- elapsed since the epoch of the Ada real-time clock.
|
||||
|
||||
end System.Tasking.Async_Delays;
|
||||
|
@ -30,15 +30,15 @@
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
with Ada.Calendar.Delays;
|
||||
|
||||
with System.OS_Constants;
|
||||
with System.OS_Primitives;
|
||||
with System.Task_Primitives.Operations;
|
||||
with System.Tasking.Initialization;
|
||||
|
||||
function System.Tasking.Async_Delays.Enqueue_Calendar
|
||||
(T : Ada.Calendar.Time;
|
||||
D : Delay_Block_Access)
|
||||
return Boolean
|
||||
(T : Ada.Calendar.Time;
|
||||
D : Delay_Block_Access) return Boolean
|
||||
is
|
||||
use type Ada.Calendar.Time;
|
||||
|
||||
@ -55,12 +55,13 @@ begin
|
||||
end if;
|
||||
|
||||
-- T is expressed as a duration elapsed since the UNIX epoch, whereas
|
||||
-- Time_Enque expects duraction elapsed since the epoch of the Ada
|
||||
-- real time clock: compensate if necessary.
|
||||
-- Time_Enque expects duraction elapsed since the epoch of the Ada real-
|
||||
-- time clock: compensate if necessary.
|
||||
|
||||
-- Comparison "SOSC.CLOCK_RT_Ada = SOSC.CLOCK_REALTIME" is compile
|
||||
-- time known, so turn warnings off.
|
||||
|
||||
pragma Warnings (Off);
|
||||
-- Comparison "SOSC.CLOCK_RT_Ada = SOSC.CLOCK_REALTIME" is compile
|
||||
-- time known.
|
||||
|
||||
if SOSC.CLOCK_RT_Ada /= SOSC.CLOCK_REALTIME then
|
||||
pragma Warnings (On);
|
||||
|
@ -6,7 +6,7 @@
|
||||
-- --
|
||||
-- S p e c --
|
||||
-- --
|
||||
-- Copyright (C) 1998-2009, Free Software Foundation, Inc. --
|
||||
-- Copyright (C) 1998-2013, 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- --
|
||||
@ -36,6 +36,5 @@
|
||||
|
||||
with Ada.Calendar;
|
||||
function System.Tasking.Async_Delays.Enqueue_Calendar
|
||||
(T : Ada.Calendar.Time;
|
||||
D : Delay_Block_Access)
|
||||
return Boolean;
|
||||
(T : Ada.Calendar.Time;
|
||||
D : Delay_Block_Access) return Boolean;
|
||||
|
@ -1225,7 +1225,13 @@ package body Sem_Cat is
|
||||
-- means that a pragma Preelaborable_Initialization was
|
||||
-- given for the private type.
|
||||
|
||||
if Has_Preelaborable_Initialization (Ent) then
|
||||
if Relaxed_RM_Semantics then
|
||||
-- In relaxed mode, do not issue these messages, this
|
||||
-- is basically similar to the GNAT_Mode test below.
|
||||
|
||||
null;
|
||||
|
||||
elsif Has_Preelaborable_Initialization (Ent) then
|
||||
|
||||
-- But for the predefined units, we will ignore this
|
||||
-- status unless we are in Ada 2005 mode since we want
|
||||
|
@ -2156,20 +2156,6 @@ package body Sem_Res is
|
||||
-- First matching interpretation
|
||||
|
||||
if not Found then
|
||||
-- If the current statement is part of a predefined library
|
||||
-- unit, then all interpretations which come from user level
|
||||
-- packages should not be considered. User-defined operators
|
||||
-- may appear anywhere in the homonym list. This exclusion
|
||||
-- does not apply in an instance, where an actual may come
|
||||
-- from a local declaration.
|
||||
|
||||
if From_Lib
|
||||
and then not Comes_From_Predefined_Lib_Unit (It.Nam)
|
||||
and then not In_Instance
|
||||
then
|
||||
goto Continue;
|
||||
end if;
|
||||
|
||||
Found := True;
|
||||
I1 := I;
|
||||
Seen := It.Nam;
|
||||
@ -2181,12 +2167,29 @@ package body Sem_Res is
|
||||
-- some more obscure cases are handled in Disambiguate.
|
||||
|
||||
else
|
||||
if From_Lib
|
||||
and then not Comes_From_Predefined_Lib_Unit (It.Nam)
|
||||
then
|
||||
goto Continue;
|
||||
-- If the current statement is part of a predefined library
|
||||
-- unit, then all interpretations which come from user level
|
||||
-- packages should not be considered. Check previous and
|
||||
-- current one.
|
||||
|
||||
if From_Lib then
|
||||
if not Comes_From_Predefined_Lib_Unit (It.Nam) then
|
||||
goto Continue;
|
||||
|
||||
elsif not Comes_From_Predefined_Lib_Unit (Seen) then
|
||||
|
||||
-- Previous interpretation must be discarded.
|
||||
|
||||
I1 := I;
|
||||
Seen := It.Nam;
|
||||
Expr_Type := It.Typ;
|
||||
Set_Entity (N, Seen);
|
||||
goto Continue;
|
||||
end if;
|
||||
end if;
|
||||
|
||||
-- Otherwise apply further disambiguation steps.
|
||||
|
||||
Error_Msg_Sloc := Sloc (Seen);
|
||||
It1 := Disambiguate (N, I1, I, Typ);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user