Re: [avr-gcc-list] AVR-Gcc and overflow behavior

2008-04-15 Thread hutchinsonandy
Since avr gcc is GCC, it will behave as decribed in blog. I dont think there is anything in backend that changes this. Andy -Original Message- From: Jonathan Blanchard [EMAIL PROTECTED] To: avr-gcc-list@nongnu.org Sent: Mon, 14 Apr 2008 4:33 pm Subject: [avr-gcc-list] AVR-Gcc

Re: [avr-gcc-list] AVR-Gcc and overflow behavior

2008-04-15 Thread John Regehr
Unsigned overflow is always OK. Signed overflow is undefined behavior (no better--in principle at least--than accessing beyond an array bound) unless you use the -fwrapv flag. John Regehr ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org

Re: [avr-gcc-list] AVR-Gcc and overflow behavior

2008-04-15 Thread Jonathan Blanchard
Thank you all for the answers. -- Jonathan Blanchard ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

[avr-gcc-list] AVR-Gcc and overflow behavior

2008-04-14 Thread Jonathan Blanchard
I was reading thought a recent discussion in the GCC dev list and also the following blog : www.airs.com/blog/archives/120 ; I'm now curious about how the avr port of gcc behave in front of overflows. Does it assume by default that overflow never occur? -- Jonathan Blanchard

Re: [avr-gcc-list] AVR-Gcc and overflow behavior

2008-04-14 Thread David Kelly
On Mon, Apr 14, 2008 at 05:33:13PM -0300, Jonathan Blanchard wrote: I was reading thought a recent discussion in the GCC dev list and also the following blog : www.airs.com/blog/archives/120 ; I'm now curious about how the avr port of gcc behave in front of overflows. Does it assume by