summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch3.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-06-22 11:11:16 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-06-22 11:11:16 +0200
commit8f443da5c3dacb71de31559b3366b8c9d25781d1 (patch)
tree6f492c0bbe4f046876d38f1a829ccf68dd3a00ea /gcc/ada/sem_ch3.adb
parentb2cacbfe4b1a904fc8b9fc58f28aa02bcc479540 (diff)
downloadgcc-8f443da5c3dacb71de31559b3366b8c9d25781d1.tar.gz
[multiple changes]
2010-06-22 Robert Dewar <dewar@adacore.com> * sem_ch3.adb: Minor reformatting. Minor code reorganization. 2010-06-22 Emmanuel Briot <briot@adacore.com> * gnat_ugn.texi, projects.texi: Remove toplevel menu, since we should not build this file on its own (only through gnat_ugn.texi). Remove macro definitions and insert simpler version in gnat_ugn.texi. From-SVN: r161151
Diffstat (limited to 'gcc/ada/sem_ch3.adb')
-rw-r--r--gcc/ada/sem_ch3.adb24
1 files changed, 11 insertions, 13 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 1de948e108e..a28a1075790 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -1553,30 +1553,28 @@ package body Sem_Ch3 is
if No (Prim) then
- -- In some are cases, a name conflict may have
- -- kept the operation completely hidden. Look for
- -- it in the list of primitive operations of the
- -- type.
+ -- In some rare cases, a name conflict may have kept the
+ -- operation completely hidden. Look for it in the list
+ -- of primitive operations of the type.
declare
- El : Elmt_Id :=
- First_Elmt (Primitive_Operations (Tagged_Type));
+ El : Elmt_Id;
begin
+ El := First_Elmt (Primitive_Operations (Tagged_Type));
while Present (El) loop
Prim := Node (El);
- if Is_Subprogram (Prim)
- and then Alias (Prim) = Iface_Prim
- then
- exit;
- end if;
+ exit when Is_Subprogram (Prim)
+ and then Alias (Prim) = Iface_Prim;
Next_Elmt (El);
end loop;
end;
end if;
+ -- If the operation was not explicitly overridden, it should
+ -- have been inherited as an abstract operation so Prim can
+ -- not be Empty at this stage.
+
if No (Prim) then
- -- If the operation was not explicitly overridden, it
- -- should have been inherited as an abstract operation.
raise Program_Error;
end if;