aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2008-05-28 15:48:08 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-05-28 15:48:08 +0200
commit3294a391cbf1f4a58dbcc8e438fd195cb004a4ad (patch)
tree0f2950d4639e5bcd144ba5b230551658b2768294
parent5b2217f83f77747f59c910a9f4a971c147b9c51f (diff)
downloadgcc-3294a391cbf1f4a58dbcc8e438fd195cb004a4ad.zip
gcc-3294a391cbf1f4a58dbcc8e438fd195cb004a4ad.tar.gz
gcc-3294a391cbf1f4a58dbcc8e438fd195cb004a4ad.tar.bz2
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
-rw-r--r--gcc/ada/restrict.adb13
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ada/restrict.adb b/gcc/ada/restrict.adb
index 5049c5b..2f1bd5d 100644
--- a/gcc/ada/restrict.adb
+++ b/gcc/ada/restrict.adb
@@ -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,7 +321,16 @@ package body Restrict is
if Restriction_Warnings (R) then
Restriction_Msg ("|violation of restriction %#?", Rimage, N);
else
- Restriction_Msg ("|violation of restriction %#", Rimage, N);
+ -- 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