Commit 20428725 by Arnaud Charlet

[multiple changes]

2011-09-05  Ed Schonberg  <schonberg@adacore.com>

	* exp_aggr.adb (Replace_Type): If the target of the assignment is
	a selected component and the right-hand side is a self-referential
	access, the proper prefix of the rewritten attribute is a copy
	of the left-hand side, not of its prefix.

2011-09-05  Robert Dewar  <dewar@adacore.com>

	* sem_ch5.adb: Minor reformatting.
	* sem_ch3.adb: Minor code clean up.

2011-09-05  Jose Ruiz  <ruiz@adacore.com>

	* exp_ch9.adb (Make_Initialize_Protection): The fact that
	restriction No_Dynamic_Attachment is in effect or not should
	not influence the default priority associated to a protected
	object. With this change, when the restriction is in effect (as
	is the case for the Ravenscar profile) the default priority of
	a protected object with an interrupt handler is in the range of
	interrupt priorities (Default_Interrupt_Priority) as required
	by D.3(10).

2011-09-05  Arnaud Charlet  <charlet@adacore.com>

	* a-iteint.ads: Fix header.

2011-09-05  Vincent Celier  <celier@adacore.com>

	* prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
	with a directory separator to avoid output such as:
	  "/path/to/objauto.cgpr" has been deleted.

From-SVN: r178542
parent e8b803e6
2011-09-05 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Replace_Type): If the target of the assignment is
a selected component and the right-hand side is a self-referential
access, the proper prefix of the rewritten attribute is a copy
of the left-hand side, not of its prefix.
2011-09-05 Robert Dewar <dewar@adacore.com>
* sem_ch5.adb: Minor reformatting.
* sem_ch3.adb: Minor code clean up.
2011-09-05 Jose Ruiz <ruiz@adacore.com>
* exp_ch9.adb (Make_Initialize_Protection): The fact that
restriction No_Dynamic_Attachment is in effect or not should
not influence the default priority associated to a protected
object. With this change, when the restriction is in effect (as
is the case for the Ravenscar profile) the default priority of
a protected object with an interrupt handler is in the range of
interrupt priorities (Default_Interrupt_Priority) as required
by D.3(10).
2011-09-05 Arnaud Charlet <charlet@adacore.com>
* a-iteint.ads: Fix header.
2011-09-05 Vincent Celier <celier@adacore.com>
* prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
with a directory separator to avoid output such as:
"/path/to/objauto.cgpr" has been deleted.
2011-09-05 Robert Dewar <dewar@adacore.com> 2011-09-05 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb: Minor reformatting. * sem_ch3.adb: Minor reformatting.
......
...@@ -6,27 +6,10 @@ ...@@ -6,27 +6,10 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2004-2011, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. In accordance with the copyright of that document, you can freely --
-- apply solely to the contents of the part following the private keyword. -- -- copy and modify this specification, provided that if you redistribute a --
-- -- -- modified version, any changes that you have made are clearly indicated. --
-- 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- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
...@@ -34,6 +17,7 @@ generic ...@@ -34,6 +17,7 @@ generic
type Cursor; type Cursor;
with function Has_Element (Position : Cursor) return Boolean; with function Has_Element (Position : Cursor) return Boolean;
pragma Unreferenced (Has_Element); pragma Unreferenced (Has_Element);
package Ada.Iterator_Interfaces is package Ada.Iterator_Interfaces is
pragma Pure; pragma Pure;
......
...@@ -2168,7 +2168,7 @@ package body Exp_Aggr is ...@@ -2168,7 +2168,7 @@ package body Exp_Aggr is
Rewrite (Expr, Rewrite (Expr,
Make_Attribute_Reference (Loc, Make_Attribute_Reference (Loc,
Attribute_Name => Name_Unrestricted_Access, Attribute_Name => Name_Unrestricted_Access,
Prefix => New_Copy_Tree (Prefix (Lhs)))); Prefix => New_Copy_Tree (Lhs)));
Set_Analyzed (Parent (Expr), False); Set_Analyzed (Parent (Expr), False);
else else
......
...@@ -12503,8 +12503,8 @@ package body Exp_Ch9 is ...@@ -12503,8 +12503,8 @@ package body Exp_Ch9 is
-- When no priority is specified but an xx_Handler pragma is, we default -- When no priority is specified but an xx_Handler pragma is, we default
-- to System.Interrupts.Default_Interrupt_Priority, see D.3(10). -- to System.Interrupts.Default_Interrupt_Priority, see D.3(10).
elsif (Has_Attach_Handler (Ptyp) or else Has_Interrupt_Handler (Ptyp)) elsif Has_Attach_Handler (Ptyp)
and then not Restriction_Active (No_Dynamic_Attachment) or else Has_Interrupt_Handler (Ptyp)
then then
Append_To (Args, Append_To (Args,
New_Reference_To (RTE (RE_Default_Interrupt_Priority), Loc)); New_Reference_To (RTE (RE_Default_Interrupt_Priority), Loc));
......
...@@ -959,6 +959,13 @@ package body Prj.Conf is ...@@ -959,6 +959,13 @@ package body Prj.Conf is
end if; end if;
end loop; end loop;
-- Make sure that Obj_Dir ends with a directory separator
if Name_Buffer (Name_Len) /= Directory_Separator then
Name_Len := Name_Len + 1;
Name_Buffer (Name_Len) := Directory_Separator;
end if;
declare declare
Obj_Dir : constant String := Name_Buffer (1 .. Name_Len); Obj_Dir : constant String := Name_Buffer (1 .. Name_Len);
Config_Switches : Argument_List_Access; Config_Switches : Argument_List_Access;
......
...@@ -3270,11 +3270,7 @@ package body Sem_Ch3 is ...@@ -3270,11 +3270,7 @@ package body Sem_Ch3 is
-- In SPARK, a declaration of unconstrained type is allowed -- In SPARK, a declaration of unconstrained type is allowed
-- only for constants of type string. -- only for constants of type string.
-- Why do we need to test Original_Node here ??? if Is_String_Type (T) and then not Constant_Present (N) then
if Is_String_Type (T)
and then not Constant_Present (Original_Node (N))
then
Check_SPARK_Restriction Check_SPARK_Restriction
("declaration of object of unconstrained type not allowed", ("declaration of object of unconstrained type not allowed",
N); N);
......
...@@ -2337,10 +2337,14 @@ package body Sem_Ch5 is ...@@ -2337,10 +2337,14 @@ package body Sem_Ch5 is
if Of_Present (N) then if Of_Present (N) then
Set_Etype (Def_Id, Component_Type (Typ)); Set_Etype (Def_Id, Component_Type (Typ));
-- Here we have a missing Range attribute
else else
Error_Msg_N Error_Msg_N
("missing Range attribute in iteration over an array", N); ("missing Range attribute in iteration over an array", N);
-- In Ada 2012 mode, this may be an attempt at an iterator
if Ada_Version >= Ada_2012 then if Ada_Version >= Ada_2012 then
Error_Msg_NE Error_Msg_NE
("\if& is meant to designate an element of the array, use OF", ("\if& is meant to designate an element of the array, use OF",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment