]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Mon, 29 Aug 2011 10:42:45 +0000 (12:42 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 29 Aug 2011 10:42:45 +0000 (12:42 +0200)
2011-08-29  Tristan Gingold  <gingold@adacore.com>

* a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
(To_Jmpbuf_Address): Ditto
(builtin_longjmp): Ditto

2011-08-29  Thomas Quinot  <quinot@adacore.com>

* sem_res.adb: Minor reformatting.

2011-08-29  Vincent Celier  <celier@adacore.com>

* make.adb (Gnatmake): Move special processing for VM targets after the
call to Get_Target_Parameters.

2011-08-29  Thomas Quinot  <quinot@adacore.com>

* sem_ch12.adb, par-ch12.adb: Minor reformatting.

From-SVN: r178197

gcc/ada/ChangeLog
gcc/ada/a-except-2005.ads
gcc/ada/a-exexpr.adb
gcc/ada/make.adb
gcc/ada/par-ch12.adb
gcc/ada/sem_ch12.adb
gcc/ada/sem_res.adb

index d9c3a9f5fefb4459dbdbf9b562a1db86ae77e603..38c160570e91df6bb00a08abfb56747e252403e1 100644 (file)
@@ -1,3 +1,22 @@
+2011-08-29  Tristan Gingold  <gingold@adacore.com>
+
+       * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
+       (To_Jmpbuf_Address): Ditto
+       (builtin_longjmp): Ditto
+
+2011-08-29  Thomas Quinot  <quinot@adacore.com>
+
+       * sem_res.adb: Minor reformatting.
+
+2011-08-29  Vincent Celier  <celier@adacore.com>
+
+       * make.adb (Gnatmake): Move special processing for VM targets after the
+       call to Get_Target_Parameters.
+
+2011-08-29  Thomas Quinot  <quinot@adacore.com>
+
+       * sem_ch12.adb, par-ch12.adb: Minor reformatting.
+
 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
 
        * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
index d631684a4064bfc7ca4fce1b3b32808fe3e9af21..f4cdebb47de079d240139c83eaddf74c3f1f4b1e 100644 (file)
@@ -50,8 +50,6 @@ with System.Parameters;
 with System.Standard_Library;
 with System.Traceback_Entries;
 
-with Ada.Unchecked_Conversion;
-
 package Ada.Exceptions is
    pragma Warnings (Off);
    pragma Preelaborate_05;
@@ -230,16 +228,13 @@ private
    --  system to return here rather than to the original location.
 
    procedure Raise_From_Controlled_Operation
-     (X          : Ada.Exceptions.Exception_Occurrence;
-      From_Abort : Boolean);
+     (X : Ada.Exceptions.Exception_Occurrence);
    pragma No_Return (Raise_From_Controlled_Operation);
    pragma Export
      (Ada, Raise_From_Controlled_Operation,
            "__gnat_raise_from_controlled_operation");
    --  Raise Program_Error, providing information about X (an exception raised
-   --  during a controlled operation) in the exception message. However, if the
-   --  finalization was triggered by abort, keep aborting instead of raising
-   --  Program_Error.
+   --  during a controlled operation) in the exception message.
 
    procedure Reraise_Occurrence_Always (X : Exception_Occurrence);
    pragma No_Return (Reraise_Occurrence_Always);
@@ -359,18 +354,4 @@ private
      Tracebacks       => (others => TBE.Null_TB_Entry),
      Private_Data     => System.Null_Address);
 
-   --  Common binding to __builtin_longjmp for sjlj variants.
-
-   --  The builtin expects a pointer type for the jmpbuf address argument, and
-   --  System.Address doesn't work because this is really an integer type.
-
-   type Jmpbuf_Address is access Character;
-
-   function To_Jmpbuf_Address is new
-     Ada.Unchecked_Conversion (System.Address, Jmpbuf_Address);
-
-   procedure builtin_longjmp (buffer : Jmpbuf_Address; Flag : Integer);
-   pragma No_Return (builtin_longjmp);
-   pragma Import (Intrinsic, builtin_longjmp, "__builtin_longjmp");
-
 end Ada.Exceptions;
index e3ae5b01cff089f8329e63137a27399bfd27f34c..b58ca23b0f91db54b8df5eaedd429a97ac4531ab 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2009, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2011, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -34,6 +34,8 @@
 
 with System.Storage_Elements;  use System.Storage_Elements;
 
+with Ada.Unchecked_Conversion;
+
 pragma Warnings (Off);
 --  Since several constructs give warnings in 3.14a1, including unreferenced
 --  variables and pragma Unreferenced itself.
@@ -41,6 +43,20 @@ pragma Warnings (Off);
 separate (Ada.Exceptions)
 package body Exception_Propagation is
 
+   --  Common binding to __builtin_longjmp for sjlj variants.
+
+   --  The builtin expects a pointer type for the jmpbuf address argument, and
+   --  System.Address doesn't work because this is really an integer type.
+
+   type Jmpbuf_Address is access Character;
+
+   function To_Jmpbuf_Address is new
+     Ada.Unchecked_Conversion (System.Address, Jmpbuf_Address);
+
+   procedure builtin_longjmp (buffer : Jmpbuf_Address; Flag : Integer);
+   pragma No_Return (builtin_longjmp);
+   pragma Import (Intrinsic, builtin_longjmp, "__builtin_longjmp");
+
    ---------------------
    -- Setup_Exception --
    ---------------------
index cc38ae8c4defb199988b7b1605859d48d9f7f5fd..d64975d21a31423eaba5ecb32f7d14b1fad2ff99 100644 (file)
@@ -5931,29 +5931,6 @@ package body Make is
            ("nothing to do for a main project that is externally built");
       end if;
 
-      --  Special processing for VM targets
-
-      if Targparm.VM_Target /= No_VM then
-
-         --  Set proper processing commands
-
-         case Targparm.VM_Target is
-            when Targparm.JVM_Target =>
-
-               --  Do not check for an object file (".o") when compiling to
-               --  JVM machine since ".class" files are generated instead.
-
-               Check_Object_Consistency := False;
-               Gcc := new String'("jvm-gnatcompile");
-
-            when Targparm.CLI_Target =>
-               Gcc := new String'("dotnet-gnatcompile");
-
-            when Targparm.No_VM =>
-               raise Program_Error;
-         end case;
-      end if;
-
       --  If no project file is used, we just put the gcc switches
       --  from the command line in the Gcc_Switches table.
 
@@ -6125,6 +6102,29 @@ package body Make is
                   Make_Failed ("*** make failed.");
             end;
 
+            --  Special processing for VM targets
+
+            if Targparm.VM_Target /= No_VM then
+
+               --  Set proper processing commands
+
+               case Targparm.VM_Target is
+               when Targparm.JVM_Target =>
+
+                  --  Do not check for an object file (".o") when compiling to
+                  --  JVM machine since ".class" files are generated instead.
+
+                  Check_Object_Consistency := False;
+                  Gcc := new String'("jvm-gnatcompile");
+
+               when Targparm.CLI_Target =>
+                  Gcc := new String'("dotnet-gnatcompile");
+
+               when Targparm.No_VM =>
+                  raise Program_Error;
+               end case;
+            end if;
+
             Is_First_Main := False;
          end if;
 
index 64f0361696971bb2cf0d74131d9601bd3a727552..b8b760cce4e29f89fcd28e4f14bad69a7a52b2bd 100644 (file)
@@ -533,7 +533,7 @@ package body Ch12 is
 
       if Token = Tok_Semicolon then
 
-         --  Ada2012: Incomplete formal type
+         --  Ada 2012: Incomplete formal type
 
          Scan; -- past semicolon
 
index 446a1d6134bd5b192a540762fa72ff2d2d698054..6f0b049e8dc5b9c6a38a236f8fdd336008ec5852 100644 (file)
@@ -342,8 +342,8 @@ package body Sem_Ch12 is
       Def : Node_Id);
    --  Creates a new private type, which does not require completion
 
-   procedure Analyze_Formal_Incomplete_Type (T   : Entity_Id; Def : Node_Id);
-   --  Ada2012: Creates a new incomplete type whose actual does not freeze
+   procedure Analyze_Formal_Incomplete_Type (T : Entity_Id; Def : Node_Id);
+   --  Ada 2012: Creates a new incomplete type whose actual does not freeze
 
    procedure Analyze_Generic_Formal_Part (N : Node_Id);
    --  Analyze generic formal part
@@ -1304,8 +1304,8 @@ package body Sem_Ch12 is
                        Assoc);
 
                      --  An instantiation is a freeze point for the actuals,
-                     --  unless this is a rewritten formal package, and
-                     --  unless it is an Ada2012 formal incomplete type.
+                     --  unless this is a rewritten formal package, or the
+                     --  formal is an Ada 2012 formal incomplete type.
 
                      if Nkind (I_Node) /= N_Formal_Package_Declaration
                        and then
@@ -1316,9 +1316,8 @@ package body Sem_Ch12 is
                      end if;
                   end if;
 
-                  --  A remote access-to-class-wide type must not be an
-                  --  actual parameter for a generic formal of an access
-                  --  type (E.2.2 (17)).
+                  --  A remote access-to-class-wide type is not a legal actual
+                  --  for a generic formal of an access type (E.2.2(17)).
 
                   if Nkind (Analyzed_Formal) = N_Formal_Type_Declaration
                     and then
@@ -9483,9 +9482,9 @@ package body Sem_Ch12 is
       procedure Validate_Interface_Type_Instance;
       procedure Validate_Private_Type_Instance;
       procedure Validate_Incomplete_Type_Instance;
-      --  These procedures perform validation tests for the named case
+      --  These procedures perform validation tests for the named case.
       --  Validate_Discriminated_Formal_Type is shared by formal private
-      --  types and Ada2012 formal incomplete types.
+      --  types and Ada 2012 formal incomplete types.
 
       function Subtypes_Match (Gen_T, Act_T : Entity_Id) return Boolean;
       --  Check that base types are the same and that the subtypes match
index b0ea74ca53896a6517d42846650c54750a245ea7..ff54fe9a3f7530009d82f4608cf15ca108ff0053 100644 (file)
@@ -4388,9 +4388,9 @@ package body Sem_Res is
                Discr : constant Entity_Id :=
                          Defining_Identifier (Associated_Node_For_Itype (Typ));
             begin
-               --  Ada2012-B052: If the designated type of the allocator is
-               --  limited, then the allocator shall not be used to define the
-               --  value of an access discriminant, unless the discriminated
+               --  Ada 2012 AI05-0052: If the designated type of the allocator
+               --  is limited, then the allocator shall not be used to define
+               --  the value of an access discriminant unless the discriminated
                --  type is immutably limited.
 
                if Ada_Version >= Ada_2012
@@ -4398,9 +4398,8 @@ package body Sem_Res is
                  and then not Is_Immutably_Limited_Type (Scope (Discr))
                then
                   Error_Msg_N
-                    ("only immutably limited types can have anonymous ", N);
-                  Error_Msg_N
-                    ("\discriminants of limited designated type", N);
+                    ("only immutably limited types can have anonymous "
+                     & "access discriminants designating a limited type", N);
                end if;
             end;