On Thu, 19 Feb 2009 10:22:23 -0800 (PST) Parthasaradhi Nayani <partha_nay...@yahoo.com> wrote:
> Hi Vincent, > If I understand correctly, the word "volatile" itself is to tell the compiler > not to ignore the statement. I am not sure if your statement is correct, but > I have used > > "asm volatile ("nop"::);" I used this too, because it's what the avr-libc manual shows, however when I do this, GCC caughs : lcd.c:96: error: ‘asm’ undeclared (first use in this function) lcd.c:96: error: (Each undeclared identifier is reported only once lcd.c:96: error: for each function it appears in.) lcd.c:96: error: expected ‘;’ before ‘volatile’ make: *** [lcd.o] Error 1 the same avr manual (section 9.6.5, "macros") suggests that using __asm__ instead of asm (and same for volatile) might help get rid of warnings. So I tried that and it worked.. so I stick with it ;-) -- Vince _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list