diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-11-13 14:08:51 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-11-13 14:08:51 +0100 |
commit | bc38dbb42271b6bdbc5e2e55200266aa5917f4bd (patch) | |
tree | f5547227256fa9497786ff77c30314fb8e931f30 /gcc/ada/sem_ch4.adb | |
parent | b512289ba21e751f7d294f4945a9e0616b5b40ab (diff) | |
download | gcc-bc38dbb42271b6bdbc5e2e55200266aa5917f4bd.zip gcc-bc38dbb42271b6bdbc5e2e55200266aa5917f4bd.tar.gz gcc-bc38dbb42271b6bdbc5e2e55200266aa5917f4bd.tar.bz2 |
[multiple changes]
2015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch9.adb, exp_fixd.adb, exp_util.adb, g-debpoo.adb,
impunit.adb, scos.ads, sem_ch4.adb, sem_prag.adb,
s-stchop-vxworks.adb: Minor reformatting.
2015-11-13 Tristan Gingold <gingold@adacore.com>
* s-rident.ads (Profile_Info): Enable Pure_Barriers for
GNAT_Extended_Ravenscar.
2015-11-13 Bob Duff <duff@adacore.com>
* sem_ch6.adb (Check_Private_Overriding): Detect the special
case where the overriding subprogram is overriding a subprogram
that was declared in the same private part.
From-SVN: r230314
Diffstat (limited to 'gcc/ada/sem_ch4.adb')
-rw-r--r-- | gcc/ada/sem_ch4.adb | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index 1b14550..999a78b 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -2192,9 +2192,9 @@ package body Sem_Ch4 is Get_Next_Interp (I, It); end loop; - -- If no valid interpretation has been found, then the type of - -- the ELSE expression does not match any interpretation of - -- the THEN expression. + -- If no valid interpretation has been found, then the type of the + -- ELSE expression does not match any interpretation of the THEN + -- expression. if Etype (N) = Any_Type then Error_Msg_N @@ -4665,10 +4665,11 @@ package body Sem_Ch4 is and then not Is_Entity_Name (Name) and then Nkind (Name) /= N_Explicit_Dereference then - Error_Msg_NE ("invalid reference to internal operation " - & "of some object of type&", N, Type_To_Use); + Error_Msg_NE + ("invalid reference to internal operation of some object of " + & "type &", N, Type_To_Use); Set_Entity (Sel, Any_Id); - Set_Etype (Sel, Any_Type); + Set_Etype (Sel, Any_Type); return; end if; @@ -4676,9 +4677,7 @@ package body Sem_Ch4 is -- visible entities are plausible interpretations, check whether -- there is some other primitive operation with that name. - if Ada_Version >= Ada_2005 - and then Is_Tagged_Type (Prefix_Type) - then + if Ada_Version >= Ada_2005 and then Is_Tagged_Type (Prefix_Type) then if (Etype (N) = Any_Type or else not Has_Candidate) and then Try_Object_Operation (N) @@ -4710,13 +4709,12 @@ package body Sem_Ch4 is if Has_Candidate and then Is_Concurrent_Type (Prefix_Type) and then Nkind (Parent (N)) = N_Procedure_Call_Statement - + then -- Duplicate the call. This is required to avoid problems with -- the tree transformations performed by Try_Object_Operation. -- Set properly the parent of the copied call, because it is -- about to be reanalyzed. - then declare Par : constant Node_Id := New_Copy_Tree (Parent (N)); @@ -7305,20 +7303,16 @@ package body Sem_Ch4 is Nam : constant Entity_Id := Current_Entity (Sel); begin - if Present (Nam) - and then Is_Overloadable (Nam) - then - if Nkind (Parent (Parent (Par))) - = N_Procedure_Call_Statement + if Present (Nam) and then Is_Overloadable (Nam) then + if Nkind (Parent (Parent (Par))) = + N_Procedure_Call_Statement then return False; - else - if Ekind (Nam) = E_Function - and then Present (First_Formal (Nam)) - then - return Ekind (First_Formal (Nam)) = E_In_Parameter; - end if; + elsif Ekind (Nam) = E_Function + and then Present (First_Formal (Nam)) + then + return Ekind (First_Formal (Nam)) = E_In_Parameter; end if; end if; end; |