+2015-11-18 Arnaud Charlet <charlet@adacore.com>
+
+ * interfac.ads (Unsigned_24): New type.
+ * sem_ch13.adb (Validate_Unchecked_Conversion): Disable error on
+ unconstrained arrays in Relaxed_RM_Semantics mode.
+
+2015-11-18 Vincent Celier <celier@adacore.com>
+
+ * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking): No
+ warning is withed unit is the interface of a Stand-Alone Library.
+
2015-11-18 Thomas Quinot <quinot@adacore.com>
* s-os_lib.ads, s-os_lib.adb(Normalize_Pathname): Support the case of
---------------------------------------------------
-- The rule here is that if a unit has dynamic elaboration checks,
- -- then any unit it withs must meeting one of the following criteria:
+ -- then any unit it withs must meet one of the following criteria:
-- 1. There is a pragma Elaborate_All for the with'ed unit
-- 2. The with'ed unit was compiled with dynamic elaboration checks
-- 3. The with'ed unit has pragma Preelaborate or Pure
-- 4. It is an internal GNAT unit (including children of GNAT)
+ -- 5. It is an interface of a Stand-Aline Library
procedure Check_Consistent_Dynamic_Elaboration_Checking is
begin
elsif Is_Internal_File_Name (WU.Sfile) then
null;
+ -- Case 5. With'ed unit is a SAL interface
+
+ elsif WU.SAL_Interface then
+ null;
+
-- Issue warning, not one of the safe cases
else
-- --
-- S p e c --
-- --
--- Copyright (C) 2002-2014, Free Software Foundation, Inc. --
+-- Copyright (C) 2002-2015, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
type Unsigned_16 is mod 2 ** 16;
for Unsigned_16'Size use 16;
+ type Unsigned_24 is mod 2 ** 24;
+ for Unsigned_24'Size use 24;
+ -- Declare this type for compatibility with legacy Ada compilers.
+ -- This is particularly useful in the context of CodePeer analysis.
+
type Unsigned_32 is mod 2 ** 32;
for Unsigned_32'Size use 32;
Target := Underlying_Type (Target);
end if;
- -- Source may be unconstrained array, but not target
+ -- Source may be unconstrained array, but not target, except in relaxed
+ -- semantics mode.
- if Is_Array_Type (Target) and then not Is_Constrained (Target) then
+ if Is_Array_Type (Target)
+ and then not Is_Constrained (Target)
+ and then not Relaxed_RM_Semantics
+ then
Error_Msg_N
("unchecked conversion to unconstrained array not allowed", N);
return;