This is the mail archive of the gcc@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]

Re: [PATCH][4.3] Deprecate -ftrapv



Unless printing "This application has requested the Runtime to terminate
it in an unusual way." counts an issuing a contraint_error in Ada,
it seems to me that -ftrapv and Ada have differing requirements.
How can you portabilty and correctly generate a constraint_error if
the code generated by -ftrapv calls the C runtime function abort()?

The advantage of a GIMPLE implementation would be that you could use a langhook to insert the appropriate function call for overflowing computation.


With INTO I don't
see any way distignuish the SIGSEGV it generates on Linux from any of
the myriad other ways a SIGSEGV can be generated.

sc.eip == 0xCE (if I remember x86 opcodes well :-) as I'm going by heart...)


That's similar to how Java traps SIGFPEs and transform them to zero-divide exceptions, IIRC.

Paolo


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