sem_util.ads: Minor reformatting

2005-03-29  Robert Dewar  <dewar@adacore.com>

	* sem_util.ads: Minor reformatting
	* gnat_rm.texi: Minor editing.

From-SVN: r97190
This commit is contained in:
Robert Dewar 2005-03-29 18:23:06 +02:00 committed by Arnaud Charlet
parent 74a20253e2
commit bf7c85c928
2 changed files with 28 additions and 35 deletions

View File

@ -8,7 +8,7 @@
@c o
@c G N A T _ RM o
@c o
@c Copyright (C) 1995-2004 Free Software Foundation o
@c Copyright (C) 1995-2005 Free Software Foundation o
@c o
@c o
@c GNAT is maintained by Ada Core Technologies Inc (http://www.gnat.com). o
@ -5156,24 +5156,18 @@ representation item for a given entity if each non-static expression in
the representation item is a name that statically denotes a constant
declared before the entity.
@end cartouche
Followed. GNAT does not support non-static expressions in representation
clauses unless they are constants declared before the entity. For
example:
Followed. In fact, GNAT goes beyond the recommended level of support
by allowing nonstatic expressions in some representation clauses even
without the need to declare constants initialized with the values of
such expressions.
For example:
@smallexample @c ada
X : Some_Type;
for X'Address use To_address (16#2000#);
X : Integer;
Y : Float;
for Y'Address use X'Address;>>
@end smallexample
@noindent
will be rejected, since the To_Address expression is non-static. Instead
write:
@smallexample @c ada
X_Address : constant Address : = To_Address (16#2000#);
X : Some_Type;
for X'Address use X_Address;
@end smallexample
@sp 1
@cartouche

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2004, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2005, 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- --
@ -391,7 +391,7 @@ package Sem_Util is
-- to check if '=' has to be expanded into a bunch component comparaisons.
function In_Instance return Boolean;
-- Returns True if the current scope is within a generic instance.
-- Returns True if the current scope is within a generic instance
function In_Instance_Body return Boolean;
-- Returns True if current scope is within the body of an instance, where
@ -436,7 +436,7 @@ package Sem_Util is
-- synthesized attribute.
function Is_Actual_Parameter (N : Node_Id) return Boolean;
-- Determines if N is an actual parameter in a subprogram call.
-- Determines if N is an actual parameter in a subprogram call
function Is_Aliased_View (Obj : Node_Id) return Boolean;
-- Determine if Obj is an aliased view, i.e. the name of an
@ -542,7 +542,7 @@ package Sem_Util is
-- Return True if E is a remote access-to-class-wide-limited_private type
function Is_Remote_Access_To_Subprogram_Type (E : Entity_Id) return Boolean;
-- Return True if E is a remote access to subprogram type.
-- Return True if E is a remote access to subprogram type
function Is_Remote_Call (N : Node_Id) return Boolean;
-- Return True if N denotes a potentially remote call
@ -642,7 +642,7 @@ package Sem_Util is
-- the call order, so this does not correspond to simply taking the
-- next entry of the Parameter_Associations list. The argument is an
-- actual previously returned by a call to First_Actual or Next_Actual.
-- Note tha the result produced is always an expression, not a parameter
-- Note that the result produced is always an expression, not a parameter
-- assciation node, even if named notation was used.
procedure Normalize_Actuals
@ -783,15 +783,14 @@ package Sem_Util is
-- Set the flag Is_Transient of the current scope
procedure Set_Size_Info (T1, T2 : Entity_Id);
-- Copies the Esize field and Has_Biased_Representation flag from
-- (sub)type entity T2 to (sub)type entity T1. Also copies the
-- Is_Unsigned_Type flag in the fixed-point and discrete cases,
-- and also copies the alignment value from T2 to T1. It does NOT
-- copy the RM_Size field, which must be separately set if this
-- is required to be copied also.
-- Copies the Esize field and Has_Biased_Representation flag from sub(type)
-- entity T2 to (sub)type entity T1. Also copies the Is_Unsigned_Type flag
-- in the fixed-point and discrete cases, and also copies the alignment
-- value from T2 to T1. It does NOT copy the RM_Size field, which must be
-- separately set if this is required to be copied also.
function Scope_Is_Transient return Boolean;
-- True if the current scope is transient.
-- True if the current scope is transient
function Static_Integer (N : Node_Id) return Uint;
-- This function analyzes the given expression node and then resolves it
@ -804,10 +803,10 @@ package Sem_Util is
-- E1 and E2 refer to different objects
function Subprogram_Access_Level (Subp : Entity_Id) return Uint;
-- Return the accessibility level of the view denoted by Subp.
-- Return the accessibility level of the view denoted by Subp
procedure Trace_Scope (N : Node_Id; E : Entity_Id; Msg : String);
-- Print debugging information on entry to each unit being analyzed.
-- Print debugging information on entry to each unit being analyzed
procedure Transfer_Entities (From : Entity_Id; To : Entity_Id);
-- Move a list of entities from one scope to another, and recompute
@ -817,14 +816,14 @@ package Sem_Util is
-- Return the accessibility level of Typ
function Unit_Declaration_Node (Unit_Id : Entity_Id) return Node_Id;
-- Unit_Id is the simple name of a program unit, this function returns
-- the corresponding xxx_Declaration node for the entity. Also applies
-- to the body entities for subprograms, tasks and protected units, in
-- which case it returns the subprogram, task or protected body node
-- for it. The unit may be a child unit with any number of ancestors.
-- Unit_Id is the simple name of a program unit, this function returns the
-- corresponding xxx_Declaration node for the entity. Also applies to the
-- body entities for subprograms, tasks and protected units, in which case
-- it returns the subprogram, task or protected body node for it. The unit
-- may be a child unit with any number of ancestors.
function Universal_Interpretation (Opnd : Node_Id) return Entity_Id;
-- Yields universal_Integer or Universal_Real if this is a candidate.
-- Yields universal_Integer or Universal_Real if this is a candidate
function Within_Init_Proc return Boolean;
-- Determines if Current_Scope is within an init proc