Commit ac0ed726 by Ed Schonberg Committed by Arnaud Charlet

sem_util.adb (Is_Object_Reference): An indexed or selected component whose…

sem_util.adb (Is_Object_Reference): An indexed or selected component whose prefix is an implicit dereference is an...

2005-07-04  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.adb (Is_Object_Reference): An indexed or selected component
	whose prefix is an implicit dereference is an object reference. Removes
	spurious errors when compiling with -gnatc.

From-SVN: r101592
parent 21ff92b4
...@@ -4074,7 +4074,9 @@ package body Sem_Util is ...@@ -4074,7 +4074,9 @@ package body Sem_Util is
else else
case Nkind (N) is case Nkind (N) is
when N_Indexed_Component | N_Slice => when N_Indexed_Component | N_Slice =>
return Is_Object_Reference (Prefix (N)); return
Is_Object_Reference (Prefix (N))
or else Is_Access_Type (Etype (Prefix (N)));
-- In Ada95, a function call is a constant object -- In Ada95, a function call is a constant object
...@@ -4089,7 +4091,9 @@ package body Sem_Util is ...@@ -4089,7 +4091,9 @@ package body Sem_Util is
when N_Selected_Component => when N_Selected_Component =>
return return
Is_Object_Reference (Selector_Name (N)) Is_Object_Reference (Selector_Name (N))
and then Is_Object_Reference (Prefix (N)); and then
(Is_Object_Reference (Prefix (N))
or else Is_Access_Type (Etype (Prefix (N))));
when N_Explicit_Dereference => when N_Explicit_Dereference =>
return True; return True;
......
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