From 683e5dc2c5f4a56d7b02200e8905d7bcf0dcb993 Mon Sep 17 00:00:00 2001 From: Robert Dewar Date: Tue, 23 Apr 2013 14:59:59 +0000 Subject: sem_ch13.adb: Minor code reorganization (remove some redundant assignments). 2013-04-23 Robert Dewar * sem_ch13.adb: Minor code reorganization (remove some redundant assignments). * sem_ch3.adb, sem_prag.adb: Minor reformatting. From-SVN: r198197 --- gcc/ada/ChangeLog | 6 ++++++ gcc/ada/sem_ch13.adb | 18 ++---------------- gcc/ada/sem_ch3.adb | 5 ++--- gcc/ada/sem_prag.adb | 3 ++- 4 files changed, 12 insertions(+), 20 deletions(-) (limited to 'gcc/ada') diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b5d5e82..c475d59 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2013-04-23 Robert Dewar + + * sem_ch13.adb: Minor code reorganization (remove some redundant + assignments). + * sem_ch3.adb, sem_prag.adb: Minor reformatting. + 2013-04-23 Yannick Moy * einfo.ads: Minor typo fix. diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index f5c03f2..8afa5099 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -1719,8 +1719,6 @@ package body Sem_Ch13 is & Build_Location_String (Eloc)))); end if; - Set_From_Aspect_Specification (Aitem, True); - Set_Corresponding_Aspect (Aitem, Aspect); Set_Is_Delayed_Aspect (Aspect); -- For Pre/Post cases, insert immediately after the entity @@ -2024,18 +2022,6 @@ package body Sem_Ch13 is if Present (Aitem) then Set_From_Aspect_Specification (Aitem, True); - - -- For a pragma, keep pointer to aspect - - if Nkind (Aitem) = N_Pragma then - Set_Corresponding_Aspect (Aitem, Aspect); - - -- Also set Is_Ignored flag. No need to set Is_Disabled. - -- We checked that right away, and would not get here. - - Set_Is_Ignored (Aitem, Is_Ignored (Aspect)); - pragma Assert (not Is_Disabled (Aspect)); - end if; end if; -- Aspect Abstract_State introduces implicit declarations for all @@ -6244,8 +6230,8 @@ package body Sem_Ch13 is -- If a Static_Predicate applies on other types, that's an error: -- either the type is scalar but non-static, or it's not even a - -- scalar type. We do not issue an error on generated types, as these - -- would be duplicates of the same error on a source type. + -- scalar type. We do not issue an error on generated types, as + -- these may be duplicates of the same error on a source type. elsif Present (Static_Predicate_Present) and then Comes_From_Source (Typ) diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 0e8e213..73ba462 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -11519,11 +11519,10 @@ package body Sem_Ch3 is -- itself will not be frozen, and the packed array type for it must -- be constructed explicitly. - if Is_Packed (Compon_Type) - and then Is_Frozen (Current_Scope) - then + if Is_Packed (Compon_Type) and then Is_Frozen (Current_Scope) then Create_Packed_Array_Type (Array_Comp); end if; + return Array_Comp; elsif Has_Discriminants (Compon_Type) then diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 6a6d342..8e7c3bd 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -7482,7 +7482,8 @@ package body Sem_Prag is -- Loop_Variant | -- Postcondition | -- Precondition | - -- Predicate + -- Predicate | + -- Statement_Assertions -- -- Note: The RM_ASSERTION_KIND list is language-defined, and the -- ID_ASSERTION_KIND list contains implementation-defined additions -- cgit v1.1