aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog10
-rw-r--r--gcc/ada/a-convec.adb15
-rw-r--r--gcc/ada/sem_ch13.adb9
3 files changed, 18 insertions, 16 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 4851d5d..e17fa0c 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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.
diff --git a/gcc/ada/a-convec.adb b/gcc/ada/a-convec.adb
index ff11fa9..c009b6b 100644
--- a/gcc/ada/a-convec.adb
+++ b/gcc/ada/a-convec.adb
@@ -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
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 8b1287c..02e5ed3 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -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.