From f9adb9d4809ee3a581551734f9d82a03ce5cff18 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 2 Aug 2011 17:30:55 +0200 Subject: [multiple changes] 2011-08-02 Vincent Celier * link.c: Only import "auto-host.h" when building the gnattools. 2011-08-02 Yannick Moy * sem_util.adb: Inter-unit inlining does not work for a subprogram which calls a local subprogram, so extract subprogram from Mark_Non_ALFA_Subprogram_Body. 2011-08-02 Javier Miranda * exp_ch9.adb (Extract_Dispatching_Call): If the type of the dispatching object is an access type then return an explicit dereference in the Object out-mode parameter. 2011-08-02 Gary Dismukes * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range compatibility checks for all indexes of an array subtype, not just the first. Reset Has_Dynamic_Range_Check on the subtype before each potential check to ensure that Insert_Range_Checks will not elide any of the dynamic checks. 2011-08-02 Yannick Moy * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize SPARK restriction at parsing time. * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE directive only if the SPARK restriction is set for this unit. From-SVN: r177183 --- gcc/ada/par-prag.adb | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'gcc/ada/par-prag.adb') diff --git a/gcc/ada/par-prag.adb b/gcc/ada/par-prag.adb index b3dab608a32..6b5318f3385 100644 --- a/gcc/ada/par-prag.adb +++ b/gcc/ada/par-prag.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- -- -- -- 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- -- @@ -89,11 +89,13 @@ function Prag (Pragma_Node : Node_Id; Semi : Source_Ptr) return Node_Id is procedure Process_Restrictions_Or_Restriction_Warnings; -- Common processing for Restrictions and Restriction_Warnings pragmas. - -- This routine only processes the case of No_Obsolescent_Features, which - -- is the only restriction that has syntactic effects. No general error - -- checking is done, since this will be done in Sem_Prag. The other case - -- processed is pragma Restrictions No_Dependence, since otherwise this is - -- done too late. + -- This routine processes the cases of No_Obsolescent_Features and SPARK, + -- which are the only restriction that have syntactic effects. In the case + -- of SPARK, it controls whether the scanner generates a token + -- Tok_SPARK_Hide for HIDE directives formatted as Ada comments. No general + -- error checking is done, since this will be done in Sem_Prag. The other + -- case processed is pragma Restrictions No_Dependence, since otherwise + -- this is done too late. ---------- -- Arg1 -- @@ -230,6 +232,10 @@ function Prag (Pragma_Node : Node_Id; Semi : Source_Ptr) return Node_Id is Set_Restriction (No_Obsolescent_Features, Pragma_Node); Restriction_Warnings (No_Obsolescent_Features) := Prag_Id = Pragma_Restriction_Warnings; + when SPARK => + Set_Restriction (SPARK, Pragma_Node); + Restriction_Warnings (SPARK) := + Prag_Id = Pragma_Restriction_Warnings; when others => null; end case; -- cgit v1.2.1