[cfe-dev] david's integer overflow stuff

Chris Lattner clattner at apple.com
Fri Sep 17 11:51:16 PDT 2010


On Sep 17, 2010, at 11:32 AM, David Chisnall wrote:

> Hi John,
> 
> On 13 Sep 2010, at 15:51, John Regehr wrote:
> 
>> Hi David-
>> 
>>> Your handler looks better suited to providing detailed error diagnostics for a more general case, so I don't believe that there is any conflict between the two.
>> 
>> Yes, definitely.  Let's just make sure to coordinate on the encoding of "op" and also that our arguments are a superset of yours.  Should be easy.
> 
> 
> I've just committed some stuff (r114192) that restores the old behaviour of -ftrapv-handler= is specified.

David, please get significant changes like this reviewed before they are committed.

>  This calls the function named as the argument to the option in case of overflow, with the prototype as described in my last mail.  Because the trap handler is now specified by name, I've removed the indirect call via the pointer, so you can just define the handler in the compilation unit, if required, or in a separate library.  You can now generate the same behaviour that earlier versions of clang generated with -ftrapv by specifying the function that __overflow_handler pointed to with this option.
> 
> Please can you take a look and make sure that it doesn't conflict with anything that you want to do.  
> 
> Chris: Is there any chance of merging this into the 2.8 branch - it would be nice if 2.8 didn't break stuff that worked with 2.7...

Absolutely not, the schedule is well past accepting new features.

-Chris 



More information about the cfe-dev mailing list