OSDN Git Service

2011-08-29 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 29 Aug 2011 12:38:27 +0000 (12:38 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 29 Aug 2011 12:38:27 +0000 (12:38 +0000)
* a-convec.adb, exp_disp.adb: Minor reformatting.

2011-08-29  Tristan Gingold  <gingold@adacore.com>

* a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178213 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/a-convec.adb
gcc/ada/a-exexpr-gcc.adb
gcc/ada/exp_disp.adb

index f00b143..1abc64f 100644 (file)
@@ -1,3 +1,11 @@
+2011-08-29  Robert Dewar  <dewar@adacore.com>
+
+       * a-convec.adb, exp_disp.adb: Minor reformatting.
+
+2011-08-29  Tristan Gingold  <gingold@adacore.com>
+
+       * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
+
 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
 
        * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
index c9c022d..f61809a 100644 (file)
@@ -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);
index 66163db..12202d8 100644 (file)
@@ -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);
index 3df1224..0d75270 100644 (file)
@@ -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;