mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-08 19:31:06 +08:00
[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
This commit is contained in:
parent
929315a917
commit
3fdb58e2eb
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user