Commit 79e705d6 by Arnaud Charlet

[multiple changes]

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

	* sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
	that appears in a generic formal part and applies to a formal
	subprogram.

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

	* a-cbmutr.ads: Minor reformatting.

From-SVN: r177458
parent 23b6deca
2011-08-05 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
that appears in a generic formal part and applies to a formal
subprogram.
2011-08-05 Robert Dewar <dewar@adacore.com>
* a-cbmutr.ads: Minor reformatting.
2011-08-05 Matthew Heaney <heaney@adacore.com> 2011-08-05 Matthew Heaney <heaney@adacore.com>
* a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- -- Copyright (C) 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. The copyright notice above, and the license provisions that follow --
...@@ -113,10 +113,12 @@ package Ada.Containers.Bounded_Multiway_Trees is ...@@ -113,10 +113,12 @@ package Ada.Containers.Bounded_Multiway_Trees is
Item : Element_Type) return Cursor; Item : Element_Type) return Cursor;
-- This version of the AI: -- This version of the AI:
-- 10-06-02 AI05-0136-1/07
-- declares Find_In_Subtree with a Container parameter, -- 10-06-02 AI05-0136-1/07
-- but this seems incorrect. We need a ruling from the
-- ARG about whether this really was intended. ??? -- declares Find_In_Subtree with a Container parameter, but this seems
-- incorrect. We need a ruling from the ARG about whether this really was
-- intended. ???
function Find_In_Subtree function Find_In_Subtree
(Container : Tree; (Container : Tree;
...@@ -204,11 +206,11 @@ package Ada.Containers.Bounded_Multiway_Trees is ...@@ -204,11 +206,11 @@ package Ada.Containers.Bounded_Multiway_Trees is
Position : Cursor); Position : Cursor);
procedure Splice_Children procedure Splice_Children
(Target : in out Tree; (Target : in out Tree;
Target_Parent : Cursor; Target_Parent : Cursor;
Before : Cursor; Before : Cursor;
Source : in out Tree; Source : in out Tree;
Source_Parent : Cursor); Source_Parent : Cursor);
procedure Splice_Children procedure Splice_Children
(Container : in out Tree; (Container : in out Tree;
...@@ -235,16 +237,18 @@ package Ada.Containers.Bounded_Multiway_Trees is ...@@ -235,16 +237,18 @@ package Ada.Containers.Bounded_Multiway_Trees is
procedure Previous_Sibling (Position : in out Cursor); procedure Previous_Sibling (Position : in out Cursor);
-- This version of the AI: -- This version of the AI:
-- 10-06-02 AI05-0136-1/07 -- 10-06-02 AI05-0136-1/07
-- declares Iterate_Children this way: -- declares Iterate_Children this way:
--
-- procedure Iterate_Children -- procedure Iterate_Children
-- (Container : Tree; -- (Container : Tree;
-- Parent : Cursor; -- Parent : Cursor;
-- Process : not null access procedure (Position : Cursor)); -- Process : not null access procedure (Position : Cursor));
--
-- It seems that the Container parameter is there by mistake, but -- It seems that the Container parameter is there by mistake, but we need
-- we need an official ruling from the ARG. ??? -- an official ruling from the ARG. ???
procedure Iterate_Children procedure Iterate_Children
(Parent : Cursor; (Parent : Cursor;
......
...@@ -4672,6 +4672,15 @@ package body Sem_Prag is ...@@ -4672,6 +4672,15 @@ package body Sem_Prag is
then then
null; null;
end if; end if;
-- Inline is a program unit pragma (RM 10.1.5) and cannot
-- appear in a formal part to apply to a formal subprogram.
elsif Nkind (Decl) in N_Formal_Subprogram_Declaration
and then List_Containing (Decl) = List_Containing (N)
then
Error_Msg_N
("Inline cannot apply to a formal subprogram", N);
end if; end if;
end if; end if;
......
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