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]

[C++ Patch] Tweak check_previous_goto_1 to emit hard errors instead of permerrors in some cases


Hi,

over the years we reworked and improved the code in decl.c checking gotos quite a bit. Lately, in some specific unsafe cases, identify_goto issues upfront an error instead of a permerror, whereas it used to always issue a permerror. Over the last weeks a few colleagues of mine noticed that we don't do that, escalating a permerror to a plain error, in a case which is certainly unsafe - decl_jump_unsafe returns 2 - thus, if the user passes -fpermissive we end up emitting assembly completely missing labels. The straightforward patchlet below passes testing on x86_64-linux.

Thanks, Paolo.

/////////////////////

Attachment: CL_jump
Description: Text document

Attachment: patch_jump
Description: Text document


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