summaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-22 13:50:02 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-22 13:50:02 +0000
commita58d632fec5eeb337f0c9464a053533103d1fc52 (patch)
treed022ac4fd9781249be4adc6771d7a30654b03922 /gcc/ada
parent4e104ca305e45835ac3444a0a19e07cf3f8d8a94 (diff)
downloadgcc-a58d632fec5eeb337f0c9464a053533103d1fc52.tar.gz
2012-02-22 Robert Dewar <dewar@adacore.com>
* exp_ch5.adb: Add comment. * sem_ch12.adb, exp_ch6.adb: minor reformatting git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184472 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/exp_ch5.adb3
-rw-r--r--gcc/ada/exp_ch6.adb14
-rw-r--r--gcc/ada/sem_ch12.adb22
4 files changed, 26 insertions, 18 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 8204c0401db..5353e3ee1c9 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2012-02-22 Robert Dewar <dewar@adacore.com>
+
+ * exp_ch5.adb: Add comment.
+ * sem_ch12.adb, exp_ch6.adb: minor reformatting
+
2012-02-22 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Freeze_Entity): Do not perform type layout within
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb
index 7eb224d0f07..2b170a6c465 100644
--- a/gcc/ada/exp_ch5.adb
+++ b/gcc/ada/exp_ch5.adb
@@ -2095,6 +2095,9 @@ package body Exp_Ch5 is
-- is not caught at the point of instantiation in earlier
-- versions.
+ -- This is wrong, error messages cannot be issued during
+ -- expansion, since they would be missed in -gnatc mode ???
+
Error_Msg_N ("assignment not available on limited type", N);
return;
end if;
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index b4d46b4c1aa..10ee14ac131 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -1418,11 +1418,14 @@ package body Exp_Ch6 is
if Is_By_Reference_Type (Etype (Formal)) then
- -- If the front-end does not perform full type layout, the actual
- -- may in fact be properly aligned but there is not enough front-end
- -- information to determine this. In that case gigi will emit an
- -- error if a copy is not legal, or generate the proper code.
- -- For other backends we report the error now.
+ -- If the front-end does not perform full type layout, the actual
+ -- may in fact be properly aligned but there is not enough front-
+ -- end information to determine this. In that case gigi will emit
+ -- an error if a copy is not legal, or generate the proper code.
+ -- For other backends we report the error now.
+
+ -- Seems wrong to be issuing an error in the expander, since it
+ -- will be missed in -gnatc mode ???
if Frontend_Layout_On_Target then
Error_Msg_N
@@ -6130,7 +6133,6 @@ package body Exp_Ch6 is
begin
Set_Has_Completion (Subp, False);
- -- Set_Has_Delayed_Freeze (Subp);
Append_Freeze_Action (Subp, Bod);
-- The body now contains raise statements, so calls to it will
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 9d823164145..c463e57199c 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -3730,8 +3730,8 @@ package body Sem_Ch12 is
-- (Could we do better and remove the original body???)
if Distribution_Stub_Mode = Generate_Caller_Stub_Body
- and then Comes_From_Source (N)
- and then Nkind (Parent (N)) = N_Compilation_Unit
+ and then Comes_From_Source (N)
+ and then Nkind (Parent (N)) = N_Compilation_Unit
then
Needs_Body := False;
end if;
@@ -3741,9 +3741,7 @@ package body Sem_Ch12 is
-- Here is a defence against a ludicrous number of instantiations
-- caused by a circular set of instantiation attempts.
- if Pending_Instantiations.Last >
- Hostparm.Max_Instantiations
- then
+ if Pending_Instantiations.Last > Hostparm.Max_Instantiations then
Error_Msg_N ("too many instantiations", N);
raise Unrecoverable_Error;
end if;
@@ -3857,13 +3855,13 @@ package body Sem_Ch12 is
Insert_Before (N, Act_Decl);
Analyze (Act_Decl);
- -- For an instantiation that is a compilation unit, place declaration
- -- on current node so context is complete for analysis (including
- -- nested instantiations). If this is the main unit, the declaration
- -- eventually replaces the instantiation node. If the instance body
- -- is created later, it replaces the instance node, and the
- -- declaration is attached to it (see
- -- Build_Instance_Compilation_Unit_Nodes).
+ -- For an instantiation that is a compilation unit, place
+ -- declaration on current node so context is complete for analysis
+ -- (including nested instantiations). If this is the main unit,
+ -- the declaration eventually replaces the instantiation node.
+ -- If the instance body is created later, it replaces the
+ -- instance node, and the declaration is attached to it
+ -- (see Build_Instance_Compilation_Unit_Nodes).
else
if Cunit_Entity (Current_Sem_Unit) = Defining_Entity (N) then