From 23866a558215a58d57e6f2a4adb68bba377db3b7 Mon Sep 17 00:00:00 2001 From: charlet Date: Tue, 14 Aug 2007 08:40:45 +0000 Subject: 2007-08-14 Robert Dewar Ed Schonberg * sem_attr.ads, sem_attr.adb (Analyze_Attribute, case Value): For enumeration type, mark all literals as referenced. (Eval_Attribute, case 'Image): If the argument is an enumeration literal and names are available, constant-fold but mark nevertheless as non-static. Clean up function names. (Name_Modifies_Prefix): Rename to Name_Implies_Lvalue_Prefix. Clarify comment. (Requires_Simple_Name_Prefix): Removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127425 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/sem_attr.ads | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'gcc/ada/sem_attr.ads') diff --git a/gcc/ada/sem_attr.ads b/gcc/ada/sem_attr.ads index 6e15eaf720d..1ca903915d5 100644 --- a/gcc/ada/sem_attr.ads +++ b/gcc/ada/sem_attr.ads @@ -542,18 +542,16 @@ package Sem_Attr is -- in appropriate contexts (i.e. in subtype marks, or as prefixes for -- other attributes). - function Name_Modifies_Prefix (Nam : Name_Id) return Boolean; - -- Determine whether the name of an attribute reference modifies the - -- contents of its prefix. "Read" is such an attribute. - - function Requires_Simple_Name_Prefix (Nam : Name_Id) return Boolean; - -- Determine whether the name of an attribute reference requires a simple - -- name rather than a value as its prefix. Such prefixes do not need to be - -- optimized. For instance in the following example: - -- I : constant Integer := 5; - -- S : constant Integer := I'Size; - -- "Size" requires a simple name prefix since "5'Size" does not make - -- sense. + function Name_Implies_Lvalue_Prefix (Nam : Name_Id) return Boolean; + -- Determine whether the name of an attribute reference categorizes its + -- prefix as an lvalue. The following attributes fall under this bracket + -- by directly or indirectly modifying their prefixes. + -- Access + -- Address + -- Input + -- Read + -- Unchecked_Access + -- Unrestricted_Access procedure Resolve_Attribute (N : Node_Id; Typ : Entity_Id); -- Performs type resolution of attribute. If the attribute yields a -- cgit v1.2.1