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
+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.
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
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.