From: Arnaud Charlet Date: Fri, 5 Aug 2011 15:34:38 +0000 (+0200) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=79e705d601f94d3a4fd62a91bedc2d30c973c9a6;p=gcc.git [multiple changes] 2011-08-05 Ed Schonberg * 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 * a-cbmutr.ads: Minor reformatting. From-SVN: r177458 --- 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 + + * 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 + + * a-cbmutr.ads: Minor reformatting. + 2011-08-05 Matthew Heaney * 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;