aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-29 12:42:45 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-29 12:42:45 +0200
commit5d59eef2697a46611385b025252447b6117578b6 (patch)
treeea12457ad334280f40506946d26b8a0deb438344 /gcc/ada
parent949a18ccb2de8ef2b73b7fc918d31d40e8b50826 (diff)
downloadgcc-5d59eef2697a46611385b025252447b6117578b6.zip
gcc-5d59eef2697a46611385b025252447b6117578b6.tar.gz
gcc-5d59eef2697a46611385b025252447b6117578b6.tar.bz2
[multiple changes]
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
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog19
-rw-r--r--gcc/ada/a-except-2005.ads23
-rw-r--r--gcc/ada/a-exexpr.adb18
-rw-r--r--gcc/ada/make.adb46
-rw-r--r--gcc/ada/par-ch12.adb2
-rw-r--r--gcc/ada/sem_ch12.adb17
-rw-r--r--gcc/ada/sem_res.adb11
7 files changed, 75 insertions, 61 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index d9c3a9f..38c1605 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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
diff --git a/gcc/ada/a-except-2005.ads b/gcc/ada/a-except-2005.ads
index d631684..f4cdebb 100644
--- a/gcc/ada/a-except-2005.ads
+++ b/gcc/ada/a-except-2005.ads
@@ -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;
diff --git a/gcc/ada/a-exexpr.adb b/gcc/ada/a-exexpr.adb
index e3ae5b0..b58ca23 100644
--- a/gcc/ada/a-exexpr.adb
+++ b/gcc/ada/a-exexpr.adb
@@ -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 --
---------------------
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb
index cc38ae8..d64975d 100644
--- a/gcc/ada/make.adb
+++ b/gcc/ada/make.adb
@@ -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;
diff --git a/gcc/ada/par-ch12.adb b/gcc/ada/par-ch12.adb
index 64f0361..b8b760c 100644
--- a/gcc/ada/par-ch12.adb
+++ b/gcc/ada/par-ch12.adb
@@ -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
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 446a1d6..6f0b049 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -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
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index b0ea74c..ff54fe9 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -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;