summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch9.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-17 08:56:40 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-17 08:56:40 +0000
commitd3ef794cfe8397e3339bdefa952bb32e9874d22c (patch)
tree592d50ba4c49a4ad6785726c1fbee9a23c1aba1a /gcc/ada/sem_ch9.adb
parent8da866b7dc6a7426782312d5ed32f907b6382add (diff)
downloadgcc-d3ef794cfe8397e3339bdefa952bb32e9874d22c.tar.gz
2010-06-17 Robert Dewar <dewar@adacore.com>
* einfo.adb: Minor code fix, allow E_Class_Wide_Type for Equivalent_Type to match documentation. 2010-06-17 Robert Dewar <dewar@adacore.com> * sem_ch6.adb, sem_ch7.adb: Minor reformatting. * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_ch10.adb, sem_ch12.adb, sem_ch4.adb, sem_ch8.adb, sem_ch13.adb: Make use of Ekind_In. 2010-06-17 Thomas Quinot <quinot@adacore.com> * sem_res.adb (Set_Slice_Subtype): Always freeze the slice's itype. 2010-06-17 Thomas Quinot <quinot@adacore.com> * freeze.adb (Freeze_Expression): Short circuit operators are valid freeze node insertion points. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160889 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch9.adb')
-rw-r--r--gcc/ada/sem_ch9.adb13
1 files changed, 3 insertions, 10 deletions
diff --git a/gcc/ada/sem_ch9.adb b/gcc/ada/sem_ch9.adb
index 9a242d5eedd..bcd42d12501 100644
--- a/gcc/ada/sem_ch9.adb
+++ b/gcc/ada/sem_ch9.adb
@@ -1174,9 +1174,7 @@ package body Sem_Ch9 is
E := First_Entity (Current_Scope);
while Present (E) loop
- if Ekind (E) = E_Function
- or else Ekind (E) = E_Procedure
- then
+ if Ekind_In (E, E_Function, E_Procedure) then
Set_Convention (E, Convention_Protected);
elsif Is_Task_Type (Etype (E))
@@ -1343,9 +1341,7 @@ package body Sem_Ch9 is
Enclosing := Scope_Stack.Table (J).Entity;
exit when Is_Entry (Enclosing);
- if Ekind (Enclosing) /= E_Block
- and then Ekind (Enclosing) /= E_Loop
- then
+ if not Ekind_In (Enclosing, E_Block, E_Loop) then
Error_Msg_N ("requeue must appear within accept or entry body", N);
return;
end if;
@@ -1576,10 +1572,7 @@ package body Sem_Ch9 is
-- perform an unconditional goto so that any further
-- references will not occur anyway.
- if Ekind (Ent) = E_Out_Parameter
- or else
- Ekind (Ent) = E_In_Out_Parameter
- then
+ if Ekind_In (Ent, E_Out_Parameter, E_In_Out_Parameter) then
Set_Never_Set_In_Source (Ent, False);
Set_Is_True_Constant (Ent, False);
end if;