It seems the problem here is "signed types are undefined on overflow".

abs (2083755264 + abs (abs (79364096) - 256))

Let express in hex on 32bit platform:

abs (0x7c339500 + abs (abs (0x4bb0000) - 0x100))
abs (0x7c339500 + 0x4baff00)
abs (undefined)

Does help to change definition of sum_abs from "int" to "unsigned int" ?

Does help to compile it with "-fwrapv" ?
        
http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Code-Gen-Options.html#Code-Gen-Options

Petr




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to