Commit 3b821fe9 by Vincent Celier Committed by Arnaud Charlet

sem_aux.adb (Is_By_Reference_Type): For each components of a record type...

2014-02-18  Vincent Celier  <celier@adacore.com>

	* sem_aux.adb (Is_By_Reference_Type): For each components of
	a record type, check also if the component is volatile as it
	may have an aspect that makes it volatile. If it is, then the
	record type is a by reference type.

From-SVN: r207842
parent 365c8496
2014-02-18 Vincent Celier <celier@adacore.com>
* sem_aux.adb (Is_By_Reference_Type): For each components of
a record type, check also if the component is volatile as it
may have an aspect that makes it volatile. If it is, then the
record type is a by reference type.
2014-02-18 Robert Dewar <dewar@adacore.com>
* exp_attr.adb: Minor reformatting.
......
......@@ -782,8 +782,15 @@ package body Sem_Aux is
begin
C := First_Component (Btype);
while Present (C) loop
-- For each component, test if its type is a by reference
-- type and if its type is volatile. Also test the component
-- itself for being volatile. This happens for example when
-- a Volatile aspect is added to a component.
if Is_By_Reference_Type (Etype (C))
or else Is_Volatile (Etype (C))
or else Is_Volatile (C)
then
return True;
end if;
......
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