From b3db0949e73243f4b0023f00d2148e09a827a30b Mon Sep 17 00:00:00 2001 From: Bob Duff Date: Mon, 9 Oct 2017 18:46:19 +0000 Subject: [PATCH] exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer. 2017-10-09 Bob Duff * exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer. 2017-10-09 Bob Duff * freeze.ads: Minor comment fixed. From-SVN: r253557 --- gcc/ada/ChangeLog | 8 ++++++++ gcc/ada/exp_ch7.adb | 2 +- gcc/ada/freeze.ads | 14 +++++++------- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index ff6392a..8b83270 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,13 @@ 2017-10-09 Bob Duff + * exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer. + +2017-10-09 Bob Duff + + * freeze.ads: Minor comment fixed. + +2017-10-09 Bob Duff + * 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 diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index 07fd33c..f5fa9a50 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -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; diff --git a/gcc/ada/freeze.ads b/gcc/ada/freeze.ads index 079d713..6ec74b4 100644 --- a/gcc/ada/freeze.ads +++ b/gcc/ada/freeze.ads @@ -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? -- 2.7.4