From 59e9bc0b6ff7d00bd56a5b4767014b6529bf820b Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 6 Jan 2015 11:22:41 +0100 Subject: [multiple changes] 2015-01-06 Ed Schonberg * sem_ch12.adb: Sloc of wrapper is that of instantiation. 2015-01-06 Robert Dewar * sem_ch11.adb: Minor reformatting. 2015-01-06 Ed Schonberg * exp_aggr.adb (Get_Assoc_Expr): New routine internal to Build_Array_Aggr_Code, used to initialized components covered by a box association. If the component type is scalar and has a default aspect, use it to initialize such components. 2015-01-06 Pascal Obry * rtinit.c (__gnat_runtime_initialize): Add a parameter to control the setup of the exception handler. * initialize.c: Remove unused declaration. * bindgen.adb: Always call __gnat_runtime_initialize and pass whether the exeception handler must be set or not. From-SVN: r219251 --- gcc/ada/sem_ch11.adb | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'gcc/ada/sem_ch11.adb') diff --git a/gcc/ada/sem_ch11.adb b/gcc/ada/sem_ch11.adb index 2e3dbd9..c193f1a 100644 --- a/gcc/ada/sem_ch11.adb +++ b/gcc/ada/sem_ch11.adb @@ -121,12 +121,11 @@ package body Sem_Ch11 is elsif Nkind (Id1) /= N_Others_Choice and then (Id_Entity = Entity (Id1) - or else (Id_Entity = Renamed_Entity (Entity (Id1)))) + or else (Id_Entity = Renamed_Entity (Entity (Id1)))) then if Handler /= Parent (Id) then Error_Msg_Sloc := Sloc (Id1); - Error_Msg_NE - ("exception choice duplicates &#", Id, Id1); + Error_Msg_NE ("exception choice duplicates &#", Id, Id1); else if Ada_Version = Ada_83 @@ -348,7 +347,7 @@ package body Sem_Ch11 is and then Nkind (First (Statements (Handler))) = N_Raise_Statement and then No (Name (First (Statements (Handler)))) and then (not Others_Present - or else Nkind (First (Exception_Choices (Handler))) = + or else Nkind (First (Exception_Choices (Handler))) = N_Others_Choice) then Error_Msg_N @@ -534,9 +533,7 @@ package body Sem_Ch11 is -- See if preceding statement is an assignment - if Present (P) - and then Nkind (P) = N_Assignment_Statement - then + if Present (P) and then Nkind (P) = N_Assignment_Statement then L := Name (P); -- Give warning for assignment to scalar formal @@ -549,7 +546,7 @@ package body Sem_Ch11 is -- This avoids some false positives for the nested case. and then Nearest_Dynamic_Scope (Current_Scope) = - Scope (Entity (L)) + Scope (Entity (L)) then -- Don't give warning if we are covered by an exception @@ -571,11 +568,11 @@ package body Sem_Ch11 is if No (Exception_Handlers (Par)) then Error_Msg_N - ("assignment to pass-by-copy formal " & - "may have no effect??", P); + ("assignment to pass-by-copy formal " + & "may have no effect??", P); Error_Msg_N - ("\RAISE statement may result in abnormal return" & - " (RM 6.4.1(17))??", P); + ("\RAISE statement may result in abnormal return " + & "(RM 6.4.1(17))??", P); end if; end if; end if; -- cgit v1.1