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] |
This patch modifies the analysis of exception handlers to bypass restriction checks when the handler is internally generated and the verification mode is warnings. ------------ -- Source -- ------------ -- gen.ads generic type Ptr is private; package Gen is end Gen; -- types.ads with Gen; package Types is type T is private; type Ptr is access all T; package Inst is new Gen (Ptr); private type T is record Comp : Integer; end record; end Types; -- gnat.adc pragma Restriction_Warnings (No_Exception_Handlers); ----------------- -- Compilation -- ----------------- $ gcc -c types.ads Tested on x86_64-pc-linux-gnu, committed on trunk 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup. (Build_Adjust_Statements): Code cleanup. (Build_Finalizer): Update the initialization of Exceptions_OK. (Build_Finalize_Statements): Code cleanup. (Build_Initialize_Statements): Code cleanup. (Make_Deep_Array_Body): Update the initialization of Exceptions_OK. (Make_Deep_Record_Body): Update the initialization of Exceptions_OK. (Process_Object_Declaration): Generate a null exception handler only when exceptions are allowed. (Process_Transients_In_Scope): Update the initialization of Exceptions_OK. * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New routine. * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any restrictions when the handler is internally generated and the mode is warnings.
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] |