From b55993b3534aaa8ddc062e1b7373b21eb57f6c2c Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 2 May 2017 11:00:48 +0200 Subject: [multiple changes] 2017-05-02 Justin Squirek * sem_ch4.adb (Analyze_Case_Expression): Add check for valid alternative expression. * sem_res.adb (Resolve_Case_Expression): Ditto. 2017-05-02 Ed Schonberg * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT): Refine predicate for the case where the primitive operation is a renaming of equality. An overriding operation that is a user-defined renaming of predefined equality inherits its slot from the overridden operation. Otherwise it is treated as a predefined op and occupies the same predefined slot as equality. A call to it is transformed into a call to its alias, which is the predefined equality. A dispatching call thus uses the proper slot if operation is further inherited and called with class-wide arguments. 2017-05-02 Justin Squirek * errout.adb (Set_Msg_Text): Add a case to switch the message type when the character '[' is detected signifying a warning about a run-time exception. * opt.ads Add a new Warning_Mode value for new switch * switch-b.adb (Scan_Binder_Switches): Add case for the binder to handle new warning mode * usage.adb (Usage): Add usage entry for -gnatwE * warnsw.adb (Set_Warning_Switch): Add case for the new switch 2017-05-02 Ed Schonberg * sem_prag.adb (Process_Conversion): Reject an intrinsic operator declaration that operates on some fixed point type. 2017-05-02 Justin Squirek * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses. From-SVN: r247478 --- gcc/ada/sem_ch4.adb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gcc/ada/sem_ch4.adb') diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index 3952789..9de3278 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -1548,6 +1548,10 @@ package body Sem_Ch4 is Alt := First (Alternatives (N)); while Present (Alt) loop + if Error_Posted (Expression (Alt)) then + return; + end if; + Analyze (Expression (Alt)); if No (FirstX) and then Etype (Expression (Alt)) /= Any_Type then @@ -2120,8 +2124,8 @@ package body Sem_Ch4 is New_N := Make_Function_Call (Loc, - Name => Make_Explicit_Dereference (Loc, P), - Parameter_Associations => New_List); + Name => Make_Explicit_Dereference (Loc, P), + Parameter_Associations => New_List); -- If the prefix is overloaded, remove operations that have formals, -- we know that this is a parameterless call. @@ -2226,12 +2230,14 @@ package body Sem_Ch4 is Check_Error_Detected; return; end if; + Then_Expr := Next (Condition); if No (Then_Expr) then Check_Error_Detected; return; end if; + Else_Expr := Next (Then_Expr); if Comes_From_Source (N) then -- cgit v1.1