This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Bogus elaboration warnings on internally-generated finalizers


This patch suppresses elaboration checks on stack-related finalizers. Both the
spec and body of a finalizer are within the same construct and scope, but the
body is part of the handled sequence of statements. This placement confuses the
elaboration mechanism on targets which do not fully support AT_END handlers.
Since the compiler guarantees that the body of a finalizer is always inserted
in the same construct where the AT_END handler resides, there is no need for
elaboration checks.

Tested on x86_64-pc-linux-gnu, committed on trunk

2012-02-22  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch7.adb (Create_Finalizer): Suppress elaboration checks on 
	stack-related finalizers.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]