Commit 3294a391 by Robert Dewar Committed by Arnaud Charlet

2008-05-28 Robert Dewar <dewar@adacore.com>

	* restrict.adb:
	(Check_Restriction): violation of restriction No_Finalization is
	treated as a serious error to stop expansion

From-SVN: r136088
parent 5b2217f8
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2008, 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- --
......@@ -321,8 +321,17 @@ package body Restrict is
if Restriction_Warnings (R) then
Restriction_Msg ("|violation of restriction %#?", Rimage, N);
else
-- Normally a restriction violation is a non-serious error,
-- but we treat violation of No_Finalization as a serious
-- error, since we want to turn off expansion in this case,
-- expansion just causes too many cascaded errors.
if R = No_Finalization then
Restriction_Msg ("violation of restriction %#", Rimage, N);
else
Restriction_Msg ("|violation of restriction %#", Rimage, N);
end if;
end if;
-- Otherwise we have the case of an implicit restriction
-- (e.g. a restriction implicitly set by another pragma)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment