Commit 3fdb58e2 by Arnaud Charlet

[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
parent 929315a9
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> 2014-10-20 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch3.adb (Build_Derived_Private_Type): When the parent * sem_ch3.adb (Build_Derived_Private_Type): When the parent
......
...@@ -241,6 +241,14 @@ package body Ada.Strings.Search is ...@@ -241,6 +241,14 @@ package body Ada.Strings.Search is
First : out Positive; First : out Positive;
Last : out Natural) Last : out Natural)
is 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 begin
for J in Source'Range loop for J in Source'Range loop
if Belongs (Source (J), Set, Test) then if Belongs (Source (J), Set, Test) then
......
...@@ -1077,16 +1077,28 @@ package body Bcheck is ...@@ -1077,16 +1077,28 @@ package body Bcheck is
-- Check_Consistent_SSO_Default -- -- 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 procedure Check_Consistent_SSO_Default is
Default : Character; Default : Character;
begin begin
Default := ALIs.Table (ALIs.First).SSO_Default; 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 -- Check all entries match the default above from the first entry
for A1 in ALIs.First + 1 .. ALIs.Last loop 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 := '?'; Default := '?';
exit; exit;
end if; end if;
...@@ -1132,7 +1144,9 @@ package body Bcheck is ...@@ -1132,7 +1144,9 @@ package body Bcheck is
Write_Eol; Write_Eol;
for A1 in ALIs.First .. ALIs.Last loop 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_Str (" ");
Write_Name (ALIs.Table (A1).Sfile); Write_Name (ALIs.Table (A1).Sfile);
Write_Eol; Write_Eol;
......
...@@ -2559,8 +2559,8 @@ types declared within that package spec or declarative part. ...@@ -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 If this pragma is used as a configuration pragma which appears within a
configuration pragma file (as opposed to appearing explicitly at the start 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 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 be compiled in a similar manner, other than run-time units, which are not
are included in the partition. affected by this pragma.
The following example shows the use of this pragma: The following example shows the use of this 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