diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-10-23 12:09:31 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-10-23 12:09:31 +0200 |
commit | 3fdb58e2eb3b2dbb3ec9bb12daf8c02fcc387e9e (patch) | |
tree | 5bea1e2894e05cee8de3881b4ded6cb9585f310e /gcc | |
parent | 929315a9177368d6b8807299bc7da3ac5e1dca21 (diff) | |
download | gcc-3fdb58e2eb3b2dbb3ec9bb12daf8c02fcc387e9e.zip gcc-3fdb58e2eb3b2dbb3ec9bb12daf8c02fcc387e9e.tar.gz gcc-3fdb58e2eb3b2dbb3ec9bb12daf8c02fcc387e9e.tar.bz2 |
[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')
-rw-r--r-- | gcc/ada/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/ada/a-strsea.adb | 8 | ||||
-rw-r--r-- | gcc/ada/bcheck.adb | 18 | ||||
-rw-r--r-- | gcc/ada/gnat_rm.texi | 4 |
4 files changed, 40 insertions, 4 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index f431f80..c07d3ee 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,17 @@ +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). + 2014-10-20 Eric Botcazou <ebotcazou@adacore.com> * sem_ch3.adb (Build_Derived_Private_Type): When the parent diff --git a/gcc/ada/a-strsea.adb b/gcc/ada/a-strsea.adb index f1fb352..2651dc8 100644 --- a/gcc/ada/a-strsea.adb +++ b/gcc/ada/a-strsea.adb @@ -241,6 +241,14 @@ package body Ada.Strings.Search is First : out Positive; Last : out Natural) is + + -- RM 2005 A.4.3 (68/1)) specifies that an exception must be raised if + -- Source'First is not positive and is assigned to First. Formulation + -- is slightly different in RM 2012, but the intent seems similar, so + -- we enable range checks for this routine. + + pragma Unsuppress (Range_Check); + begin for J in Source'Range loop if Belongs (Source (J), Set, Test) then diff --git a/gcc/ada/bcheck.adb b/gcc/ada/bcheck.adb index be48f06..dd723b3 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; diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 425791f..11a8d41 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -2559,8 +2559,8 @@ types declared within that package spec or declarative part. If this pragma is used as a configuration pragma which appears within a configuration pragma file (as opposed to appearing explicitly at the start of a single unit), then the binder will require that all units in a partition -be compiled in a similar manner, including all units in the run-time that -are included in the partition. +be compiled in a similar manner, other than run-time units, which are not +affected by this pragma. The following example shows the use of this pragma: |