aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorHristian Kirtchev <kirtchev@adacore.com>2015-10-26 13:04:09 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2015-10-26 14:04:09 +0100
commite3d6bccc831ddd49e6b8e888df5e301c2da339b4 (patch)
treeedcbfa02176100fc6518c155eace5c03c22ee6bd /gcc
parent97561cdcf018ec03d6267ee81f018e036452b09b (diff)
downloadgcc-e3d6bccc831ddd49e6b8e888df5e301c2da339b4.zip
gcc-e3d6bccc831ddd49e6b8e888df5e301c2da339b4.tar.gz
gcc-e3d6bccc831ddd49e6b8e888df5e301c2da339b4.tar.bz2
sem_ch3.adb, [...]: Minor reformatting.
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch3.adb, sem_util.adb: Minor reformatting. From-SVN: r229354
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog4
-rw-r--r--gcc/ada/sem_ch3.adb13
-rw-r--r--gcc/ada/sem_util.adb36
3 files changed, 32 insertions, 21 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 2066c1f..4ce0053 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,7 @@
+2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * sem_ch3.adb, sem_util.adb: Minor reformatting.
+
2015-10-26 Javier Miranda <miranda@adacore.com>
* exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Return False when
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 9b5f5da..7358c0d 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -3276,7 +3276,7 @@ package body Sem_Ch3 is
function Count_Tasks (T : Entity_Id) return Uint;
-- This function is called when a non-generic library level object of a
-- task type is declared. Its function is to count the static number of
- -- tasks declared within the type (it is only called if Has_Tasks is set
+ -- tasks declared within the type (it is only called if Has_Task is set
-- for T). As a side effect, if an array of tasks with non-static bounds
-- or a variant record type is encountered, Check_Restriction is called
-- indicating the count is unknown.
@@ -5241,14 +5241,13 @@ package body Sem_Ch3 is
Cstr : constant Node_Id := Constraint (Subtype_Indication (N));
begin
if Nkind (Cstr) = N_Index_Or_Discriminant_Constraint
- and then not (Is_Internal (Defining_Identifier (N))
- and then Is_TSS (Scope (Defining_Identifier (N)),
- TSS_Composite_Equality))
+ and then not (Is_Internal (Id)
+ and then Is_TSS (Scope (Id),
+ TSS_Composite_Equality))
and then not Within_Init_Proc
+ and then not All_Composite_Constraints_Static (Cstr)
then
- if not All_Composite_Constraints_Static (Cstr) then
- Check_Restriction (No_Dynamic_Sized_Objects, Cstr);
- end if;
+ Check_Restriction (No_Dynamic_Sized_Objects, Cstr);
end if;
end;
end if;
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index f27b855..1ac0a2f 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -452,33 +452,39 @@ package body Sem_Util is
and then Present (Entity (Constr))
then
if Is_Type (Entity (Constr)) then
- return not Is_Discrete_Type (Entity (Constr))
- or else Is_OK_Static_Subtype (Entity (Constr));
+ return
+ not Is_Discrete_Type (Entity (Constr))
+ or else Is_OK_Static_Subtype (Entity (Constr));
end if;
elsif Nkind (Constr) = N_Range then
- return Is_OK_Static_Expression (Low_Bound (Constr))
- and then Is_OK_Static_Expression (High_Bound (Constr));
+ return
+ Is_OK_Static_Expression (Low_Bound (Constr))
+ and then
+ Is_OK_Static_Expression (High_Bound (Constr));
elsif Nkind (Constr) = N_Attribute_Reference
and then Attribute_Name (Constr) = Name_Range
then
- return Is_OK_Static_Expression
- (Type_Low_Bound (Etype (Prefix (Constr))))
- and then Is_OK_Static_Expression
+ return
+ Is_OK_Static_Expression
+ (Type_Low_Bound (Etype (Prefix (Constr))))
+ and then
+ Is_OK_Static_Expression
(Type_High_Bound (Etype (Prefix (Constr))));
end if;
- return not Present (Etype (Constr)) -- previous error
- or else not Is_Discrete_Type (Etype (Constr))
- or else Is_OK_Static_Expression (Constr);
+ return
+ not Present (Etype (Constr)) -- previous error
+ or else not Is_Discrete_Type (Etype (Constr))
+ or else Is_OK_Static_Expression (Constr);
when N_Discriminant_Association =>
return All_Composite_Constraints_Static (Expression (Constr));
when N_Range_Constraint =>
- return All_Composite_Constraints_Static
- (Range_Expression (Constr));
+ return
+ All_Composite_Constraints_Static (Range_Expression (Constr));
when N_Index_Or_Discriminant_Constraint =>
declare
@@ -497,8 +503,10 @@ package body Sem_Util is
return True;
when N_Subtype_Indication =>
- return All_Composite_Constraints_Static (Subtype_Mark (Constr))
- and then All_Composite_Constraints_Static (Constraint (Constr));
+ return
+ All_Composite_Constraints_Static (Subtype_Mark (Constr))
+ and then
+ All_Composite_Constraints_Static (Constraint (Constr));
when others =>
raise Program_Error;