Commit 40f4dbbe by Arnaud Charlet

[multiple changes]

2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_prag.adb (Analyze_Input_Item): Allow formal
	parameters to appear as input_items in an initialization_list
	of pragma Initializes. Encapsulation now applies to states and
	variables only (as it should). Add RM references to key errors.
	* sem_prag.adb (Set_Imported): Suppress errors
	about preceding Imports when the pragma does not come from source,
	which can happen through use of pragma Provide_Shift_Operators.

2014-06-11  Thomas Quinot  <quinot@adacore.com>

	* sem_ch3.adb: Minor reformatting.
	* einfo.ads (Full_View): Minor comment update.

From-SVN: r211460
parent e9daba51
2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Input_Item): Allow formal
parameters to appear as input_items in an initialization_list
of pragma Initializes. Encapsulation now applies to states and
variables only (as it should). Add RM references to key errors.
* sem_prag.adb (Set_Imported): Suppress errors
about preceding Imports when the pragma does not come from source,
which can happen through use of pragma Provide_Shift_Operators.
2014-06-11 Thomas Quinot <quinot@adacore.com>
* sem_ch3.adb: Minor reformatting.
* einfo.ads (Full_View): Minor comment update.
2014-06-11 Robert Dewar <dewar@adacore.com>
* einfo.adb (Is_Independent): New flag.
* einfo.ads (Is_Independent): New flag.
(Has_Independent_Components): Clean up and fix comments.
* sem_prag.adb (Fix_Error): Deal with changing argument
[of] to entity [for].
(Analyze_Pragma, case Independent): Set Is_Independent flag
(Analyze_Pragma, case Independent_Components): Set Is_Independent flag
in all components of specified record.
2014-06-11 Thomas Quinot <quinot@adacore.com>
* sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
Set proper Etype on bounds of dummy type created for analysis
of the generic.
2014-06-11 Robert Dewar <dewar@adacore.com>
* debug.adb: Minor comment fix (add missing section of dot
numeric flags).
2014-06-11 Robert Dewar <dewar@adacore.com> 2014-06-11 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb, * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
......
...@@ -1336,12 +1336,12 @@ package Einfo is ...@@ -1336,12 +1336,12 @@ package Einfo is
-- Full_View (Node11) -- Full_View (Node11)
-- Defined in all type and subtype entities and in deferred constants. -- Defined in all type and subtype entities and in deferred constants.
-- References the entity for the corresponding full type declaration. -- References the entity for the corresponding full type or constant
-- For all types other than private and incomplete types, this field -- declaration. For all types other than private and incomplete types,
-- always contains Empty. If an incomplete type E1 is completed by a -- this field always contains Empty. If an incomplete type E1 is
-- private type E2 whose full type declaration entity is E3 then the -- completed by a private type E2 whose full type declaration entity is
-- full view of E1 is E2, and the full view of E2 is E3. See also -- E3 then the full view of E1 is E2, and the full view of E2 is E3. See
-- Underlying_Type. -- also Underlying_Type.
-- Generic_Homonym (Node11) -- Generic_Homonym (Node11)
-- Defined in generic packages. The generic homonym is the entity of -- Defined in generic packages. The generic homonym is the entity of
...@@ -1581,9 +1581,11 @@ package Einfo is ...@@ -1581,9 +1581,11 @@ package Einfo is
-- Implicit_Dereference. Set also on the discriminant named in the aspect -- Implicit_Dereference. Set also on the discriminant named in the aspect
-- clause, to simplify type resolution. -- clause, to simplify type resolution.
-- Has_Independent_Components (Flag34) -- Has_Independent_Components (Flag34) [base type only]
-- Defined in objects and types. Set if the aspect Independent_Components -- Defined in types. Set if the aspect Independent_Components applies
-- applies (as set by coresponding pragma or aspect specification). -- (in the base type only), if corresponding pragma or aspect applies.
-- In the case of an object of anonymous array type, the flag is set on
-- the created array type.
-- Has_Inheritable_Invariants (Flag248) -- Has_Inheritable_Invariants (Flag248)
-- Defined in all type entities. Set in private types from which one -- Defined in all type entities. Set in private types from which one
...@@ -2415,6 +2417,11 @@ package Einfo is ...@@ -2415,6 +2417,11 @@ package Einfo is
-- Is_Incomplete_Type (synthesized) -- Is_Incomplete_Type (synthesized)
-- Applies to all entities, true for incomplete types and subtypes -- Applies to all entities, true for incomplete types and subtypes
-- Is_Independent (Flag268)
-- Defined in record components. Set if a valid pragma or aspect
-- Independent applies to the component, or if a valid pragma or aspect
-- Independent_Components applies to the enclosing record type.
-- Is_Inlined (Flag11) -- Is_Inlined (Flag11)
-- Defined in all entities. Set for functions and procedures which are -- Defined in all entities. Set for functions and procedures which are
-- to be inlined. For subprograms created during expansion, this flag -- to be inlined. For subprograms created during expansion, this flag
...@@ -4215,7 +4222,7 @@ package Einfo is ...@@ -4215,7 +4222,7 @@ package Einfo is
-- In addition, we define the kind E_Allocator_Type to label allocators. -- In addition, we define the kind E_Allocator_Type to label allocators.
-- This is because special resolution rules apply to this construct. -- This is because special resolution rules apply to this construct.
-- Eventually the constructs are labeled with the access type imposed by -- Eventually the constructs are labeled with the access type imposed by
-- the context. Gigi should never see the type E_Allocator. -- the context. Gigi should never see types with this Ekind.
-- Similarly, the type E_Access_Attribute_Type is used as the initial kind -- Similarly, the type E_Access_Attribute_Type is used as the initial kind
-- associated with an access attribute. After resolution a specific access -- associated with an access attribute. After resolution a specific access
...@@ -4398,8 +4405,8 @@ package Einfo is ...@@ -4398,8 +4405,8 @@ package Einfo is
-- 'Unrestricted_Access and Unchecked_Access) -- 'Unrestricted_Access and Unchecked_Access)
E_Allocator_Type, E_Allocator_Type,
-- A special internal type used to label allocators and attribute -- A special internal type used to label allocators and references to
-- references using 'Access. This is needed because special resolution -- objects using 'Reference. This is needed because special resolution
-- rules apply to these constructs. On the resolution pass, this type -- rules apply to these constructs. On the resolution pass, this type
-- is always replaced by the actual access type, so Gigi should never -- is always replaced by the actual access type, so Gigi should never
-- see types with this Ekind. -- see types with this Ekind.
...@@ -5350,6 +5357,7 @@ package Einfo is ...@@ -5350,6 +5357,7 @@ package Einfo is
-- Has_Biased_Representation (Flag139) -- Has_Biased_Representation (Flag139)
-- Has_Per_Object_Constraint (Flag154) -- Has_Per_Object_Constraint (Flag154)
-- Is_Atomic (Flag85) -- Is_Atomic (Flag85)
-- Is_Independent (Flag268)
-- Is_Tag (Flag78) -- Is_Tag (Flag78)
-- Is_Volatile (Flag16) -- Is_Volatile (Flag16)
-- Treat_As_Volatile (Flag41) -- Treat_As_Volatile (Flag41)
...@@ -5379,7 +5387,6 @@ package Einfo is ...@@ -5379,7 +5387,6 @@ package Einfo is
-- Has_Atomic_Components (Flag86) -- Has_Atomic_Components (Flag86)
-- Has_Biased_Representation (Flag139) -- Has_Biased_Representation (Flag139)
-- Has_Completion (Flag26) (constants only) -- Has_Completion (Flag26) (constants only)
-- Has_Independent_Components (Flag34) (base type only)
-- Has_Thunks (Flag228) (constants only) -- Has_Thunks (Flag228) (constants only)
-- Has_Size_Clause (Flag29) -- Has_Size_Clause (Flag29)
-- Has_Up_Level_Access (Flag215) -- Has_Up_Level_Access (Flag215)
...@@ -6089,7 +6096,6 @@ package Einfo is ...@@ -6089,7 +6096,6 @@ package Einfo is
-- Has_Alignment_Clause (Flag46) -- Has_Alignment_Clause (Flag46)
-- Has_Atomic_Components (Flag86) -- Has_Atomic_Components (Flag86)
-- Has_Biased_Representation (Flag139) -- Has_Biased_Representation (Flag139)
-- Has_Independent_Components (Flag34) (base type only)
-- Has_Initial_Value (Flag219) -- Has_Initial_Value (Flag219)
-- Has_Size_Clause (Flag29) -- Has_Size_Clause (Flag29)
-- Has_Up_Level_Access (Flag215) -- Has_Up_Level_Access (Flag215)
...@@ -6589,6 +6595,7 @@ package Einfo is ...@@ -6589,6 +6595,7 @@ package Einfo is
function Is_Immediately_Visible (Id : E) return B; function Is_Immediately_Visible (Id : E) return B;
function Is_Implementation_Defined (Id : E) return B; function Is_Implementation_Defined (Id : E) return B;
function Is_Imported (Id : E) return B; function Is_Imported (Id : E) return B;
function Is_Independent (Id : E) return B;
function Is_Inlined (Id : E) return B; function Is_Inlined (Id : E) return B;
function Is_Instantiated (Id : E) return B; function Is_Instantiated (Id : E) return B;
function Is_Interface (Id : E) return B; function Is_Interface (Id : E) return B;
...@@ -7217,6 +7224,7 @@ package Einfo is ...@@ -7217,6 +7224,7 @@ package Einfo is
procedure Set_Is_Immediately_Visible (Id : E; V : B := True); procedure Set_Is_Immediately_Visible (Id : E; V : B := True);
procedure Set_Is_Implementation_Defined (Id : E; V : B := True); procedure Set_Is_Implementation_Defined (Id : E; V : B := True);
procedure Set_Is_Imported (Id : E; V : B := True); procedure Set_Is_Imported (Id : E; V : B := True);
procedure Set_Is_Independent (Id : E; V : B := True);
procedure Set_Is_Inlined (Id : E; V : B := True); procedure Set_Is_Inlined (Id : E; V : B := True);
procedure Set_Is_Instantiated (Id : E; V : B := True); procedure Set_Is_Instantiated (Id : E; V : B := True);
procedure Set_Is_Interface (Id : E; V : B := True); procedure Set_Is_Interface (Id : E; V : B := True);
...@@ -7979,6 +7987,7 @@ package Einfo is ...@@ -7979,6 +7987,7 @@ package Einfo is
pragma Inline (Is_Imported); pragma Inline (Is_Imported);
pragma Inline (Is_Incomplete_Or_Private_Type); pragma Inline (Is_Incomplete_Or_Private_Type);
pragma Inline (Is_Incomplete_Type); pragma Inline (Is_Incomplete_Type);
pragma Inline (Is_Independent);
pragma Inline (Is_Inlined); pragma Inline (Is_Inlined);
pragma Inline (Is_Instantiated); pragma Inline (Is_Instantiated);
pragma Inline (Is_Integer_Type); pragma Inline (Is_Integer_Type);
...@@ -8426,6 +8435,7 @@ package Einfo is ...@@ -8426,6 +8435,7 @@ package Einfo is
pragma Inline (Set_Is_Immediately_Visible); pragma Inline (Set_Is_Immediately_Visible);
pragma Inline (Set_Is_Implementation_Defined); pragma Inline (Set_Is_Implementation_Defined);
pragma Inline (Set_Is_Imported); pragma Inline (Set_Is_Imported);
pragma Inline (Set_Is_Independent);
pragma Inline (Set_Is_Inlined); pragma Inline (Set_Is_Inlined);
pragma Inline (Set_Is_Instantiated); pragma Inline (Set_Is_Instantiated);
pragma Inline (Set_Is_Interface); pragma Inline (Set_Is_Interface);
......
...@@ -15508,7 +15508,6 @@ package body Sem_Ch3 is ...@@ -15508,7 +15508,6 @@ package body Sem_Ch3 is
or else No (Full_View (Prev)) or else No (Full_View (Prev))
or else not Is_Private_Type (Full_View (Prev))) or else not Is_Private_Type (Full_View (Prev)))
then then
-- Indicate that the incomplete declaration has a matching full -- Indicate that the incomplete declaration has a matching full
-- declaration. The defining occurrence of the incomplete -- declaration. The defining occurrence of the incomplete
-- declaration remains the visible one, and the procedure -- declaration remains the visible one, and the procedure
......
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