Commit dff99e1a by Arnaud Charlet

[multiple changes]

2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch12.adb (Check_Private_View): Exchange the private and full view
	of a designated type when the related access type is an actual in an
	instance. This ensures that the full view of designated type is
	available when inside the body of the instance.

2011-08-30  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
	in a position to be modified, a slice is treated like an indexed
	component.

From-SVN: r178308
parent 63be2a5a
2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch12.adb (Check_Private_View): Exchange the private and full view
of a designated type when the related access type is an actual in an
instance. This ensures that the full view of designated type is
available when inside the body of the instance.
2011-08-30 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
in a position to be modified, a slice is treated like an indexed
component.
2011-08-30 Thomas Quinot <quinot@adacore.com>
* s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
......
......@@ -5749,12 +5749,17 @@ package body Sem_Ch12 is
end if;
-- For composite types with inconsistent representation exchange
-- component types accordingly.
-- component types accordingly. We exchange the private and full view
-- of a designated type when the related access type is an actual in
-- an instance. This ensures that the full view of designated type is
-- available when inside the body of the instance.
-- Is this right ???
elsif Is_Access_Type (T)
and then Is_Private_Type (Designated_Type (T))
and then not Has_Private_View (N)
and then Present (Full_View (Designated_Type (T)))
and then Used_As_Generic_Actual (T)
then
Switch_View (Designated_Type (T));
......
......@@ -9044,7 +9044,7 @@ package body Sem_Util is
-- or slice is an lvalue, except if it is an access type, where we
-- have an implicit dereference.
when N_Indexed_Component =>
when N_Indexed_Component | N_Slice =>
if N /= Prefix (P)
or else (Present (Etype (N)) and then Is_Access_Type (Etype (N)))
then
......
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