[multiple changes]

2015-10-23  Bob Duff  <duff@adacore.com>

	* a-convec.adb (Copy): Make sure C is initialized
	on all paths, including when Checks is False.

2015-10-23  Eric Botcazou  <ebotcazou@adacore.com>

	* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove
	error as unreachable.

From-SVN: r229242
This commit is contained in:
Arnaud Charlet 2015-10-23 14:29:51 +02:00
parent 2700b9c1ee
commit d742bfc009
3 changed files with 18 additions and 16 deletions

View File

@ -1,3 +1,13 @@
2015-10-23 Bob Duff <duff@adacore.com>
* a-convec.adb (Copy): Make sure C is initialized
on all paths, including when Checks is False.
2015-10-23 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove
error as unreachable.
2015-10-23 Arnaud Charlet <charlet@adacore.com>
* gnat1drv.adb (Adjust_Global_Switches): Adjust.

View File

@ -346,15 +346,16 @@ package body Ada.Containers.Vectors is
C : Count_Type;
begin
if Capacity = 0 then
C := Source.Length;
elsif Capacity >= Source.Length then
if Capacity >= Source.Length then
C := Capacity;
elsif Checks then
raise Capacity_Error with
"Requested capacity is less than Source length";
else
C := Source.Length;
if Checks and then Capacity /= 0 then
raise Capacity_Error with
"Requested capacity is less than Source length";
end if;
end if;
return Target : Vector do

View File

@ -4808,15 +4808,6 @@ package body Sem_Ch13 is
end if;
end;
if Is_Exported (U_Ent) then
Error_Msg_N
("& cannot be exported if an address clause is given",
Nam);
Error_Msg_N
("\define and export a variable "
& "that holds its address instead", Nam);
end if;
-- Entity has delayed freeze, so we will generate an
-- alignment check at the freeze point unless suppressed.