exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer.
authorBob Duff <duff@adacore.com>
Mon, 9 Oct 2017 18:46:19 +0000 (18:46 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 9 Oct 2017 18:46:19 +0000 (18:46 +0000)
2017-10-09  Bob Duff  <duff@adacore.com>

* exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer.

2017-10-09  Bob Duff  <duff@adacore.com>

* freeze.ads: Minor comment fixed.

From-SVN: r253557

gcc/ada/ChangeLog
gcc/ada/exp_ch7.adb
gcc/ada/freeze.ads

index ff6392a..8b83270 100644 (file)
@@ -1,5 +1,13 @@
 2017-10-09  Bob Duff  <duff@adacore.com>
 
+       * exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer.
+
+2017-10-09  Bob Duff  <duff@adacore.com>
+
+       * freeze.ads: Minor comment fixed.
+
+2017-10-09  Bob Duff  <duff@adacore.com>
+
        * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take
        care of unchecked conversions in addition to regular conversions. This
        takes care of a case where a type is derived from a private untagged
index 07fd33c..f5fa9a5 100644 (file)
@@ -1955,7 +1955,7 @@ package body Exp_Ch7 is
                Insert_After (Finalizer_Insert_Nod, Fin_Body);
             end if;
 
-            Analyze (Fin_Body);
+            Analyze (Fin_Body, Suppress => All_Checks);
          end if;
       end Create_Finalizer;
 
index 079d713..6ec74b4 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2016, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2017, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -114,15 +114,15 @@ package Freeze is
 
    --      Are always frozen at the point of declaration
 
-   --  The flag Has_Delayed_Freeze is used for to indicate that delayed
-   --  freezing is required. Usually the associated freeze node is allocated
-   --  at the freezing point. One special exception occurs with anonymous
-   --  base types, where the freeze node is preallocated at the point of
-   --  declaration, so that the First_Subtype_Link field can be set.
+   --  The flag Has_Delayed_Freeze is used to indicate that delayed freezing
+   --  is required. Usually the associated freeze node is allocated at the
+   --  freezing point. One special exception occurs with anonymous base types,
+   --  where the freeze node is preallocated at the point of declaration, so
+   --  that the First_Subtype_Link field can be set.
 
    Freezing_Library_Level_Tagged_Type : Boolean := False;
    --  Flag used to indicate that we are freezing the primitives of a library
-   --  level tagged types. Used to disable checks on premature freezing.
+   --  level tagged type. Used to disable checks on premature freezing.
    --  More documentation needed??? why is this flag needed? what are these
    --  checks? why do they need disabling in some cases?