Re: [avr-gcc-list] Should this code work? 4.1.1

2007-03-05 Thread Bob Paddock
On Sunday 04 March 2007 14:21, Gavin Jackson wrote: Another thing you may want to take a look at is the SPIF flag on page 174 of the datasheet. It states that: From what the datasheet says, your SPIF bit is never cleared so you'll be overwriting the SPI data register contents before they've

Re: [avr-gcc-list] Should this code work? 4.1.1

2007-03-05 Thread Dave Hansen
From: Graham Davies [EMAIL PROTECTED] Bob Paddock wrote: [...] I don't see while(true){} being any different than for(;;){} in this context, and while(true){} causes the Lint error of evaluation of constant value boolean. [...] I can't see why Lint would consider this an error and for ( ; ;

[avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++)

2007-03-05 Thread Dmitry K.
Hi, wrong code by avr-gcc 4.1.1: Program: ~~~ /* This program is compiled as endless loop: condition `c1 != 0' is not tested. In original (real) program there was an another error: in conditional expression based on c1 and c2 inside the loops (here this is removed). Compiler: