From dce86910a33ed9132a1662216b55e7d21a14f9fa Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 5 Aug 2008 10:17:24 +0200 Subject: [PATCH] sem_res.adb (Resolve_Call): If this is a call to the predefined Abort_Task... 2008-08-05 Ed Schonberg * sem_res.adb (Resolve_Call): If this is a call to the predefined Abort_Task, warn if the call appears within a protected operation. From-SVN: r138672 --- gcc/ada/ChangeLog | 39 +++++++++++++++++++++++++++++++++++++++ gcc/ada/sem_res.adb | 6 +++++- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 93c23926fe2c..914331d5e051 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,42 @@ +2008-08-05 Robert Dewar + + * sem_ch3.adb: Minor reformatting + + * checks.adb: Minor reformatting + +2008-08-05 Thomas Quinot + + * tbuild.ads (New_External_Name): Update spec to reflect relaxed + restriction on Prefix. + +2008-08-05 Jerome Lambourg + + * g-comlin.adb (Sort_Sections, Group_Switches): New/Modified internal + methods needed to handle switch sections when building a command line. + (Define_Section, Add_Switch, Remove_Switch, Is_New_Section, + Current_Section): New public methods or methods modified to handle + building command lines with sections. + (Set_Command_Line): Take into account sections when analysing a switch + string. + (Start): Sort the switches by sections before iterating the command line + elements. + + * g-comlin.ads (Define_Section, Add_Switch, Remove_Switch, + Is_New_Section, Current_Section): New methods or methods modified to + handle building command lines with sections. + +2008-08-05 Ed Schonberg + + * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): For access + discriminants, indicate that the corresponding object declaration has + no initialization, to prevent spurious warnings when the access type is + null-excluding. + +2008-08-05 Ed Schonberg + + * sem_res.adb (Resolve_Call): If this is a call to the predefined + Abort_Task, warn if the call appears within a protected operation. + 2008-08-04 Robert Dewar * exp_ch4.adb (Expand_N_In): Suppress range warnings in instances diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 4e0e0dedfcd9..b0d46ae72b02 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -5221,12 +5221,16 @@ package body Sem_Res is end if; -- Check for violation of restriction No_Specific_Termination_Handlers + -- and warn on a potentially blocking call to Abort_Task. if Is_RTE (Nam, RE_Set_Specific_Handler) or else Is_RTE (Nam, RE_Specific_Handler) then Check_Restriction (No_Specific_Termination_Handlers, N); + + elsif Is_RTE (Nam, RE_Abort_Task) then + Check_Potentially_Blocking_Operation (N); end if; -- All done, evaluate call and deal with elaboration issues @@ -9557,7 +9561,7 @@ package body Sem_Res is -- return statement, because in that case the accessibility check -- takes place after the return. - elsif Ekind (Target_Type) in Access_Subprogram_Kind + elsif Is_Access_Subprogram_Type (Target_Type) and then No (Corresponding_Remote_Type (Opnd_Type)) then if Ekind (Base_Type (Opnd_Type)) = E_Anonymous_Access_Subprogram_Type -- 2.47.2