[cfe-dev] A problem met during using -ftrapv

David Chisnall csdavec at swan.ac.uk
Fri May 28 05:14:07 PDT 2010


On 28 May 2010, at 08:28, peng li wrote:

> void overflow_handler(long long a, long long b, char c, char d) {
>  printf("overflow occurs!\n");
> }
> 
> void (*__overflow_handler)(long long, long long, char, char) = overflow_handler;


The return type of these two should be long long.  Not sure if this is related to your problem.  The return value from this function will be truncated and used as the result of the operation.

David

-- Sent from my PDP-11





More information about the cfe-dev mailing list