[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] [bug #22163] Everytime ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
From: |
Tomasz Francuz |
Subject: |
[avr-libc-dev] [bug #22163] Everytime ATOMIC_BLOCK(ATOMIC_RESTORESTATE) compiler generates warning - unused variable 'sreg_save' |
Date: |
Thu, 31 Jan 2008 02:56:25 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 |
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/