+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
with System.Standard_Library;
with System.Traceback_Entries;
-with Ada.Unchecked_Conversion;
-
package Ada.Exceptions is
pragma Warnings (Off);
pragma Preelaborate_05;
-- 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);
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;
-- --
-- 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- --
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.
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 --
---------------------
("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.
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;
if Token = Tok_Semicolon then
- -- Ada2012: Incomplete formal type
+ -- Ada 2012: Incomplete formal type
Scan; -- past semicolon
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
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
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
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
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
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;