aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/bcheck.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-10-23 12:09:31 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-10-23 12:09:31 +0200
commit3fdb58e2eb3b2dbb3ec9bb12daf8c02fcc387e9e (patch)
tree5bea1e2894e05cee8de3881b4ded6cb9585f310e /gcc/ada/bcheck.adb
parent929315a9177368d6b8807299bc7da3ac5e1dca21 (diff)
[multiple changes]
2014-10-23 Thomas Quinot <quinot@adacore.com> * bcheck.adb (Check_Consistent_SSO_Default): Exclude internal units from consistency check. * gnat_rm.texi (Default_Scalar_Storage_Order): Document that consistency check excludes run-time units. 2014-10-23 Ed Schonberg <schonberg@adacore.com> * a-strsea.adb (Find_Token): Enable constraint checking in this procedure, so that even when compiling with checks suppressed, as is the case for the run-time, an exception is raised in this routine when the input meets the conditions described in RM 2005 A.4.3 (68/1). From-SVN: r216580
Diffstat (limited to 'gcc/ada/bcheck.adb')
-rw-r--r--gcc/ada/bcheck.adb18
1 files changed, 16 insertions, 2 deletions
diff --git a/gcc/ada/bcheck.adb b/gcc/ada/bcheck.adb
index be48f06fecf..dd723b36910 100644
--- a/gcc/ada/bcheck.adb
+++ b/gcc/ada/bcheck.adb
@@ -1077,16 +1077,28 @@ package body Bcheck is
-- Check_Consistent_SSO_Default --
----------------------------------
+ -- This routine checks for a consistent SSO default setting. Note that
+ -- internal units are excluded from this check, since we don't in any
+ -- case allow the pragma to affect types in internal units, and there
+ -- is thus no requirement to recompile the run-time with the default set.
+
procedure Check_Consistent_SSO_Default is
Default : Character;
begin
Default := ALIs.Table (ALIs.First).SSO_Default;
+ -- The default must be set from a non-internal unit
+
+ pragma Assert
+ (not Is_Internal_File_Name (ALIs.Table (ALIs.First).Sfile));
+
-- Check all entries match the default above from the first entry
for A1 in ALIs.First + 1 .. ALIs.Last loop
- if ALIs.Table (A1).SSO_Default /= Default then
+ if not Is_Internal_File_Name (ALIs.Table (A1).Sfile)
+ and then ALIs.Table (A1).SSO_Default /= Default
+ then
Default := '?';
exit;
end if;
@@ -1132,7 +1144,9 @@ package body Bcheck is
Write_Eol;
for A1 in ALIs.First .. ALIs.Last loop
- if ALIs.Table (A1).SSO_Default = ' ' then
+ if not Is_Internal_File_Name (ALIs.Table (A1).Sfile)
+ and then ALIs.Table (A1).SSO_Default = ' '
+ then
Write_Str (" ");
Write_Name (ALIs.Table (A1).Sfile);
Write_Eol;