summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r--gcc/ada/sem_util.adb14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 47a8c35f68f..e910dd33983 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -10786,7 +10786,6 @@ package body Sem_Util is
while Present (Component)
and then Comes_From_Source (Component)
loop
-
-- Skip anonymous types generated by constrained components
if not Is_Type (Component) then
@@ -12235,10 +12234,12 @@ package body Sem_Util is
------------------------------------
function Type_Without_Stream_Operation
- (T : Entity_Id; Op : TSS_Name_Type := TSS_Null) return Entity_Id
+ (T : Entity_Id;
+ Op : TSS_Name_Type := TSS_Null) return Entity_Id
is
- BT : constant Entity_Id := Base_Type (T);
+ BT : constant Entity_Id := Base_Type (T);
Op_Missing : Boolean;
+
begin
if not Restriction_Active (No_Default_Stream_Attributes) then
return Empty;
@@ -12247,8 +12248,8 @@ package body Sem_Util is
if Is_Elementary_Type (T) then
if Op = TSS_Null then
Op_Missing :=
- No (TSS (BT, TSS_Stream_Read))
- or else No (TSS (BT, TSS_Stream_Write));
+ No (TSS (BT, TSS_Stream_Read))
+ or else No (TSS (BT, TSS_Stream_Write));
else
Op_Missing := No (TSS (BT, Op));
@@ -12256,7 +12257,6 @@ package body Sem_Util is
if Op_Missing then
return T;
-
else
return Empty;
end if;
@@ -12273,6 +12273,7 @@ package body Sem_Util is
Comp := First_Component (T);
while Present (Comp) loop
C_Typ := Type_Without_Stream_Operation (Etype (Comp), Op);
+
if Present (C_Typ) then
return C_Typ;
end if;
@@ -12287,7 +12288,6 @@ package body Sem_Util is
and then Present (Full_View (T))
then
return Type_Without_Stream_Operation (Full_View (T), Op);
-
else
return Empty;
end if;