aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_attr.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-08-01 15:31:14 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-08-01 15:31:14 +0200
commitb80a2b4bcc7e4a7c5282c78d6d96df185137ae34 (patch)
treeb6d280d4cfd0b876e933c7610106b4c88591c8a0 /gcc/ada/sem_attr.adb
parent4b259b2d0605d3da3357b46a35bd7ec92b1aaee1 (diff)
downloadgcc-b80a2b4bcc7e4a7c5282c78d6d96df185137ae34.zip
gcc-b80a2b4bcc7e4a7c5282c78d6d96df185137ae34.tar.gz
gcc-b80a2b4bcc7e4a7c5282c78d6d96df185137ae34.tar.bz2
[multiple changes]
2014-08-01 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node to create the name of the parameterless call, rather than New_Copy, to preserve the tree structure when the name is a complex expression, e.g. a selected component that denotes a protected operation, whose prefix is itself a selected component. 2014-08-01 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use Unit_Declaration_Node to retrieve body when inlining, to handle properly subprogram child units. 2014-08-01 Robert Dewar <dewar@adacore.com> * sem_attr.adb: Minor reformatting. From-SVN: r213459
Diffstat (limited to 'gcc/ada/sem_attr.adb')
-rw-r--r--gcc/ada/sem_attr.adb21
1 files changed, 7 insertions, 14 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 599212f..904595e 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -2983,9 +2983,7 @@ package body Sem_Attr is
-- because it was valid in the generic unit. Ditto if this is
-- an inlining of a function declared in an instance.
- if In_Instance
- or else In_Inlined_Body
- then
+ if In_Instance or else In_Inlined_Body then
return;
-- For sure OK if we have a real private type itself, but must
@@ -3130,12 +3128,10 @@ package body Sem_Attr is
-- The prefix denotes either the task type, or else a
-- single task whose task type is being analyzed.
- if (Is_Type (Tsk)
- and then Tsk = S)
-
+ if (Is_Type (Tsk) and then Tsk = S)
or else (not Is_Type (Tsk)
- and then Etype (Tsk) = S
- and then not (Comes_From_Source (S)))
+ and then Etype (Tsk) = S
+ and then not (Comes_From_Source (S)))
then
null;
else
@@ -3166,7 +3162,6 @@ package body Sem_Attr is
begin
Get_First_Interp (P, Index, It);
-
while Present (It.Nam) loop
if It.Nam = Ent then
null;
@@ -3241,9 +3236,7 @@ package body Sem_Attr is
when Attribute_Descriptor_Size =>
Check_E0;
- if not Is_Entity_Name (P)
- or else not Is_Type (Entity (P))
- then
+ if not Is_Entity_Name (P) or else not Is_Type (Entity (P)) then
Error_Attr_P ("prefix of attribute % must denote a type");
end if;
@@ -3547,8 +3540,8 @@ package body Sem_Attr is
if Etype (P) = Standard_Exception_Type then
Set_Etype (N, RTE (RE_Exception_Id));
- -- Ada 2005 (AI-345): Attribute 'Identity may be applied to
- -- task interface class-wide types.
+ -- Ada 2005 (AI-345): Attribute 'Identity may be applied to task
+ -- interface class-wide types.
elsif Is_Task_Type (Etype (P))
or else (Is_Access_Type (Etype (P))