diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-31 18:05:19 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-31 18:05:19 +0000 |
commit | 63776baf924523c5599ec559c905e3d22e897fbe (patch) | |
tree | 7e8babcc62128fb11dce00aba20ff8ee49859956 /gcc/ada/restrict.ads | |
parent | b855d8cef1e3ac7eaf18c0445e0c80dcbf5f1520 (diff) | |
download | gcc-63776baf924523c5599ec559c905e3d22e897fbe.tar.gz |
2006-10-31 Arnaud Charlet <charlet@adacore.com>
Robert Dewar <dewar@adacore.com>
* restrict.ads, restrict.adb (Restriction_Active): Now returns False if
only a restriction warning is active for the given restriction. This is
desirable because we do not want to modify code in the case where only
a warning is set.
(Set_Profile_Restrictions): Make sure that a Profile_Warnings never
causes overriding of real restrictions.
Take advantage of new No_Restrictions constant.
* raise.h: (__gnat_set_globals): Change profile.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118295 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/restrict.ads')
-rw-r--r-- | gcc/ada/restrict.ads | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/ada/restrict.ads b/gcc/ada/restrict.ads index 8eb9c8dccfc..063de24955e 100644 --- a/gcc/ada/restrict.ads +++ b/gcc/ada/restrict.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2006, 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- -- @@ -33,7 +33,7 @@ with Uintp; use Uintp; package Restrict is - Restrictions : Restrictions_Info; + Restrictions : Restrictions_Info := No_Restrictions; -- This variable records restrictions found in any units in the main -- extended unit, and in the case of restrictions checked for partition -- consistency, restrictions found in any with'ed units, parent specs @@ -50,7 +50,7 @@ package Restrict is -- pragma, and a value of System_Location is used for restrictions -- set from package Standard by the processing in Targparm. - Main_Restrictions : Restrictions_Info; + Main_Restrictions : Restrictions_Info := No_Restrictions; -- This variable records only restrictions found in any units of the -- main extended unit. These are the variables used for ali file output, -- since we want the binder to be able to accurately diagnose inter-unit @@ -243,7 +243,9 @@ package Restrict is pragma Inline (Restriction_Active); -- Determines if a given restriction is active. This call should only be -- used where the compiled code depends on whether the restriction is - -- active. Always use Check_Restriction to record a violation. + -- active. Always use Check_Restriction to record a violation. Note that + -- this returns False if we only have a Restriction_Warnings set, since + -- restriction warnings should never affect generated code. function Restricted_Profile return Boolean; -- Tests if set of restrictions corresponding to Profile (Restricted) is |