diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-14 08:40:45 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-14 08:40:45 +0000 |
commit | 23866a558215a58d57e6f2a4adb68bba377db3b7 (patch) | |
tree | 778e85a418abd06355401c4f840c91da4be82e94 /gcc/ada/sem_attr.ads | |
parent | 294776e50fcf207bd4a63c1f703956d4bdfb7b93 (diff) | |
download | gcc-23866a558215a58d57e6f2a4adb68bba377db3b7.tar.gz |
2007-08-14 Robert Dewar <dewar@adacore.com>
Ed Schonberg <schonberg@adacore.com>
* 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
Diffstat (limited to 'gcc/ada/sem_attr.ads')
-rw-r--r-- | gcc/ada/sem_attr.ads | 22 |
1 files changed, 10 insertions, 12 deletions
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 |