+2011-08-30 Robert Dewar <dewar@adacore.com>
+
+ * gnat_rm.texi: Minor change.
+ * exp_attr_light.adb: Minor reformatting.
+
+2011-08-30 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb: Patch inheritance of aspects in
+ Complete_Private_Subtype, to avoid infinite loop.
+
2011-08-30 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
procedure Expand_Light_N_Attribute_Reference (N : Node_Id) is
Id : constant Attribute_Id := Get_Attribute_Id (Attribute_Name (N));
+
begin
case Id is
- when Attribute_Old |
- Attribute_Result =>
+ when Attribute_Old |
+ Attribute_Result =>
Expand_N_Attribute_Reference (N);
when others =>
@end cartouche
Followed.
-@cindex pragma Volatile
-@findex Volatile
-@unnumberedsec C.6(16): Definition of effect of pragma Volatile
-@sp 1
-@cartouche
-All tasks of the program (on all processors) that read or update volatile
-variables see the same order of updates to the variables.
-@end cartouche
-
-The semantics for pragma volatile is that provided by the gcc back-end for
-implementation of volatile in C or C++. On some targets this may meet the
-serialization requirement stated above. On other targets this implementation
-advice is not followed.
-
@cindex Package @code{Task_Attributes}
@findex Task_Attributes
@unnumberedsec C.7.2(30): The Package Task_Attributes
-- type, so we must be sure not to overwrite these entries.
declare
+ Append : Boolean;
Item : Node_Id;
Next_Item : Node_Id;
-- is not done, as that would create a circularity.
elsif Item /= First_Rep_Item (Priv) then
+ Append := True;
+
loop
Next_Item := Next_Rep_Item (Item);
exit when No (Next_Item);
Item := Next_Item;
+
+ -- If the private view has aspect specifications, the full view
+ -- inherits them. Since these aspects may already have been
+ -- attached to the full view during derivation, do not append
+ -- them if already present.
+
+ if Item = First_Rep_Item (Priv) then
+ Append := False;
+ exit;
+ end if;
end loop;
-- And link the private type items at the end of the chain
- Set_Next_Rep_Item (Item, First_Rep_Item (Priv));
+ if Append then
+ Set_Next_Rep_Item (Item, First_Rep_Item (Priv));
+ end if;
end if;
end;