Follow-up Comment #3, bug #22163 (project avr-libc): Sorry, but mistake I didn't mention that I'm using avr-g++ compiler. When using avr-gcc everything is working perfectly, but in g++ the following code produces warning: #include <util/atomic.h>
int main() { volatile int b,a; a=0; b=0; ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { if(b==0) a++; } } I don't know if you consider it as a bug, but it would be great if ATOMIC_BLOCK could be used in c++. _______________________________________________________ Reply to this item at: <http://savannah.nongnu.org/bugs/?22163> _______________________________________________ Message sent via/by Savannah http://savannah.nongnu.org/ _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-libc-dev