aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-07-10 15:20:49 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-07-10 15:20:49 +0200
commit3c92a2b888436e11fbf7c78d3e8eb133b6d3fd4e (patch)
tree8d9da74536b1f8c66efcdaaa046b194dd6e80774 /gcc
parent811c6a85c4e29f55dc408dcf6f5dff08c5a4f999 (diff)
downloadgcc-3c92a2b888436e11fbf7c78d3e8eb133b6d3fd4e.zip
gcc-3c92a2b888436e11fbf7c78d3e8eb133b6d3fd4e.tar.gz
gcc-3c92a2b888436e11fbf7c78d3e8eb133b6d3fd4e.tar.bz2
Minor reformatting.
From-SVN: r149475
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_prag.adb16
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 90de628..45dc5f9 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -3584,7 +3584,7 @@ package body Sem_Prag is
end if;
-- Components of imported CPP types must not have default
- -- expressions because the constructor (if any) is in the
+ -- expressions because the constructor (if any) is on the
-- C++ side.
declare
@@ -6309,9 +6309,9 @@ package body Sem_Prag is
-- because in C++ they don't have a dispatch table slot.
-- However, in Ada the constructor has the profile of a
-- function that returns a tagged type and therefore it has
- -- been considered by the Semantic analyzer a dispatching
- -- primitive operation. We extract it now from the list of
- -- primitive operations of the type.
+ -- been treated as a primitive operation during semantic
+ -- analysis. We now remove it from the list of primitive
+ -- operations of the type.
if Is_Tagged_Type (Etype (Def_Id))
and then not Is_Class_Wide_Type (Etype (Def_Id))
@@ -6320,9 +6320,7 @@ package body Sem_Prag is
Tag_Typ := Etype (Def_Id);
Elmt := First_Elmt (Primitive_Operations (Tag_Typ));
- while Present (Elmt)
- and then Node (Elmt) /= Def_Id
- loop
+ while Present (Elmt) and then Node (Elmt) /= Def_Id loop
Next_Elmt (Elmt);
end loop;
@@ -6331,8 +6329,8 @@ package body Sem_Prag is
end if;
-- For backward compatibility, if the constructor returns a
- -- class wide type we internally change the returned type to
- -- the corresponding non class-wide type.
+ -- class wide type, and we internally change the return type to
+ -- the corresponding root type.
if Is_Class_Wide_Type (Etype (Def_Id)) then
Set_Etype (Def_Id, Root_Type (Etype (Def_Id)));