Ok thanks i use gcc 4.3.2 secondary question is if i remove volatile from code register unsigned char lastrec asm("r8")
then while generate asm efficient but dont work why? a0: 88 11 cpse r24, r8 a2: ff cf rjmp .-2 ; 0xa2 <waitACK+0x2> and without register volatile unsigned char lastrec make work but big code ac: 80 91 62 00 lds r24, 0x0062 b0: 98 17 cp r25, r24 b2: e1 f7 brne .-8 ; 0xac <waitACK+0x2> I understand that gcc miss, but if register is clause to change storing possition of var and volatile is for "change defining on the fly" i dont understand trouble for gcc compile this ok. Joerg Wunsch wrote: > > max2009tiny <m...@canor-audio.com> wrote: > >> Hi everybody. I make project on Tiny2313 and use >> >> volatile register unsigned char lastrec asm("r8") > > "volatile register" doesn't work. > > There used to be a warning for this, which has been dropped in the > past. GCC 4.4 does have the warning back: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34351 > > -- > cheers, J"org .-.-. --... ...-- -.. . DL8DTL > > http://www.sax.de/~joerg/ NIC: JW11-RIPE > Never trust an operating system you don't have sources for. ;-) > > > _______________________________________________ > AVR-GCC-list mailing list > AVR-GCC-list@nongnu.org > http://lists.nongnu.org/mailman/listinfo/avr-gcc-list > > -- View this message in context: http://old.nabble.com/Volatile-bad-compiled-while-tp26513165p26540180.html Sent from the AVR - gcc mailing list archive at Nabble.com. _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list