diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-05 15:34:38 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-05 15:34:38 +0000 |
commit | 217a36050a351d990f922f810e8f96b70252e667 (patch) | |
tree | 987fb72dc520e16c725fefa3ff882d8820439562 /gcc/ada | |
parent | f987f9a415ab997804c18c49eabf22ac6f73ca89 (diff) | |
download | gcc-217a36050a351d990f922f810e8f96b70252e667.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177458 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/ada/a-cbmutr.ads | 32 | ||||
-rw-r--r-- | gcc/ada/sem_prag.adb | 9 |
3 files changed, 37 insertions, 14 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 061010c533f..c37c1de30d0 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 bc6de38b0ae..b62e67fe308 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 d699fd4eb9a..1e4bbe4b26c 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; |