diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index f00b143bbf0..1abc64fd94a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2011-08-29 Robert Dewar + + * a-convec.adb, exp_disp.adb: Minor reformatting. + +2011-08-29 Tristan Gingold + + * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C. + 2011-08-29 Gary Dismukes * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set diff --git a/gcc/ada/a-convec.adb b/gcc/ada/a-convec.adb index c9c022d26a4..f61809adf40 100644 --- a/gcc/ada/a-convec.adb +++ b/gcc/ada/a-convec.adb @@ -2176,12 +2176,10 @@ package body Ada.Containers.Vectors is return No_Element; end Next; - function Next (Object : Iterator; Position : Cursor) return Cursor - is + function Next (Object : Iterator; Position : Cursor) return Cursor is begin if Position.Index = Object.Container.Last then return No_Element; - else return (Object.Container, Position.Index + 1); end if; @@ -2255,8 +2253,7 @@ package body Ada.Containers.Vectors is return No_Element; end Previous; - function Previous (Object : Iterator; Position : Cursor) return Cursor - is + function Previous (Object : Iterator; Position : Cursor) return Cursor is begin if Position.Index > Index_Type'First then return (Object.Container, Position.Index - 1); diff --git a/gcc/ada/a-exexpr-gcc.adb b/gcc/ada/a-exexpr-gcc.adb index 66163dbb85b..12202d8b120 100644 --- a/gcc/ada/a-exexpr-gcc.adb +++ b/gcc/ada/a-exexpr-gcc.adb @@ -166,6 +166,7 @@ package body Exception_Propagation is -- to maintain anyway. type GNAT_GCC_Exception_Access is access all GNAT_GCC_Exception; + pragma Convention (C, GNAT_GCC_Exception_Access); function To_GCC_Exception is new Unchecked_Conversion (GNAT_GCC_Exception_Access, GCC_Exception_Access); diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb index 3df1224e92b..0d752703328 100644 --- a/gcc/ada/exp_disp.adb +++ b/gcc/ada/exp_disp.adb @@ -3698,8 +3698,9 @@ package body Exp_Disp is Typ : Entity_Id) is Comp : Entity_Id; - function Is_Actual_For_Formal_Incomplete_Type (T : Entity_Id) - return Boolean; + + function Is_Actual_For_Formal_Incomplete_Type + (T : Entity_Id) return Boolean; -- In Ada2012, if a nested generic has an incomplete formal type, the -- actual may be (and usually is) a private type whose completion -- appears later. It is safe to build the dispatch table in this @@ -3709,11 +3710,12 @@ package body Exp_Disp is -- Is_Actual_For_Formal_Incomplete_Type -- ------------------------------------------ - function Is_Actual_For_Formal_Incomplete_Type (T : Entity_Id) - return Boolean + function Is_Actual_For_Formal_Incomplete_Type + (T : Entity_Id) return Boolean is Gen_Par : Entity_Id; F : Node_Id; + begin if not Is_Generic_Instance (Current_Scope) or else not Used_As_Generic_Actual (T) @@ -3739,6 +3741,8 @@ package body Exp_Disp is return False; end Is_Actual_For_Formal_Incomplete_Type; + -- Start of processing for Check_Premature_Freezing + begin if Present (N) and then Is_Private_Type (Typ) @@ -3761,7 +3765,7 @@ package body Exp_Disp is and then Present (Comp) and then not Is_Frozen (Comp) and then - not Is_Actual_For_Formal_Incomplete_Type (Comp) + not Is_Actual_For_Formal_Incomplete_Type (Comp) then Error_Msg_Sloc := Sloc (Subp); Error_Msg_Node_2 := Subp;