aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/inline.ads
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2007-08-14 10:37:08 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-08-14 10:37:08 +0200
commit939c12d26a67c4e4d42d106d31c8f821b68cb1fb (patch)
tree0b0083f9957b2140f9c2d30921874267d00521be /gcc/ada/inline.ads
parent835d23b2e08bb08e88163700eac0dc08442b2b0b (diff)
downloadgcc-939c12d26a67c4e4d42d106d31c8f821b68cb1fb.zip
gcc-939c12d26a67c4e4d42d106d31c8f821b68cb1fb.tar.gz
gcc-939c12d26a67c4e4d42d106d31c8f821b68cb1fb.tar.bz2
inline.adb, [...]: Suppress unmodified in-out parameter warning in some cases This patch is a also...
2007-08-14 Robert Dewar <dewar@adacore.com> Ed Schonberg <schonberg@adacore.com> * inline.adb, types.ads, inline.ads, frontend.adb, alloc.ads: Suppress unmodified in-out parameter warning in some cases This patch is a also fairly significant change to the way suppressible checks are handled. * checks.ads, checks.adb (Install_Null_Excluding_Check): No check needed for access to concurrent record types generated by the expander. (Generate_Range_Check): When generating a temporary to capture the value of a conversion that requires a range check, set the type of the temporary before rewriting the node, so that the type is always properly placed for back-end use. (Apply_Float_Conversion_Check): Handle case where the conversion is truncating. (Get_Discriminal): Code reformatting. Climb the scope stack looking for a protected type in order to examine its discriminants. From-SVN: r127410
Diffstat (limited to 'gcc/ada/inline.ads')
-rw-r--r--gcc/ada/inline.ads23
1 files changed, 20 insertions, 3 deletions
diff --git a/gcc/ada/inline.ads b/gcc/ada/inline.ads
index 115e633..4b80f77 100644
--- a/gcc/ada/inline.ads
+++ b/gcc/ada/inline.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2007, 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- --
@@ -37,8 +37,9 @@
-- Frontend, and thus are not mutually recursive.
with Alloc;
+with Sem; use Sem;
with Table;
-with Types; use Types;
+with Types; use Types;
package Inline is
@@ -51,7 +52,7 @@ package Inline is
-- global data structure, and the bodies constructed by means of a separate
-- analysis and expansion step.
- -- See full description in body of Sem_Ch12 for details
+ -- See full description in body of Sem_Ch12 for more details
type Pending_Body_Info is record
Inst_Node : Node_Id;
@@ -68,6 +69,22 @@ package Inline is
-- The semantic unit within which the instantiation is found. Must
-- be restored when compiling the body, to insure that internal enti-
-- ties use the same counter and are unique over spec and body.
+
+ Scope_Suppress : Suppress_Array;
+ Local_Suppress_Stack_Top : Suppress_Stack_Entry_Ptr;
+ -- Save suppress information at the point of instantiation. Used to
+ -- properly inherit check status active at this point (see RM 11.5
+ -- (7.2/2), AI95-00224-01):
+ --
+ -- "If a checking pragma applies to a generic instantiation, then the
+ -- checking pragma also applies to the instance. If a checking pragma
+ -- applies to a call to a subprogram that has a pragma Inline applied
+ -- to it, then the checking pragma also applies to the inlined
+ -- subprogram body".
+ --
+ -- This means we have to capture this information from the current scope
+ -- at the point of instantiation.
+
end record;
package Pending_Instantiations is new Table.Table (