aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-05 17:34:38 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-05 17:34:38 +0200
commit79e705d601f94d3a4fd62a91bedc2d30c973c9a6 (patch)
tree987fb72dc520e16c725fefa3ff882d8820439562
parent23b6decabf0a733a8d4aa3ebf452ac8ba4623fef (diff)
downloadgcc-79e705d601f94d3a4fd62a91bedc2d30c973c9a6.zip
gcc-79e705d601f94d3a4fd62a91bedc2d30c973c9a6.tar.gz
gcc-79e705d601f94d3a4fd62a91bedc2d30c973c9a6.tar.bz2
[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
-rw-r--r--gcc/ada/ChangeLog10
-rw-r--r--gcc/ada/a-cbmutr.ads32
-rw-r--r--gcc/ada/sem_prag.adb9
3 files changed, 37 insertions, 14 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 061010c..c37c1de 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,13 @@
+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>
* a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
diff --git a/gcc/ada/a-cbmutr.ads b/gcc/ada/a-cbmutr.ads
index bc6de38..b62e67f 100644
--- a/gcc/ada/a-cbmutr.ads
+++ b/gcc/ada/a-cbmutr.ads
@@ -6,7 +6,7 @@
-- --
-- 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 --
-- GNAT. The copyright notice above, and the license provisions that follow --
@@ -113,10 +113,12 @@ package Ada.Containers.Bounded_Multiway_Trees is
Item : Element_Type) return Cursor;
-- This version of the AI:
- -- 10-06-02 AI05-0136-1/07
- -- 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. ???
+
+ -- 10-06-02 AI05-0136-1/07
+
+ -- 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
(Container : Tree;
@@ -204,11 +206,11 @@ package Ada.Containers.Bounded_Multiway_Trees is
Position : Cursor);
procedure Splice_Children
- (Target : in out Tree;
- Target_Parent : Cursor;
- Before : Cursor;
- Source : in out Tree;
- Source_Parent : Cursor);
+ (Target : in out Tree;
+ Target_Parent : Cursor;
+ Before : Cursor;
+ Source : in out Tree;
+ Source_Parent : Cursor);
procedure Splice_Children
(Container : in out Tree;
@@ -235,16 +237,18 @@ package Ada.Containers.Bounded_Multiway_Trees is
procedure Previous_Sibling (Position : in out Cursor);
-- This version of the AI:
+
-- 10-06-02 AI05-0136-1/07
+
-- declares Iterate_Children this way:
- --
+
-- procedure Iterate_Children
-- (Container : Tree;
-- Parent : Cursor;
-- Process : not null access procedure (Position : Cursor));
- --
- -- It seems that the Container parameter is there by mistake, but
- -- we need an official ruling from the ARG. ???
+
+ -- It seems that the Container parameter is there by mistake, but we need
+ -- an official ruling from the ARG. ???
procedure Iterate_Children
(Parent : Cursor;
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index d699fd4..1e4bbe4 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -4672,6 +4672,15 @@ package body Sem_Prag is
then
null;
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;