AVR C Runtime Library - Bugs: bug #22163, Everytime...
You are not allowed to post comments on this tracker with your current authentication level.
bug #22163: Everytime ATOMIC_BLOCK(ATOMIC_RESTORESTATE) C++ compiler generates warning - unused variable 'sreg_save'
Submitter: | Tomasz Francuz <tfrancuz> | ||
Submitted: | Wed 30 Jan 2008 05:17:06 AM UTC | ||
Category: | Header | Severity: | 4 - Important |
Priority: | 9 - Immediate | Item Group: | libc code |
Status: | None | Assigned to: | None |
Percent Complete: | 0% | Open/Closed: | Open |
Release: | Any | Fixed Release: | None |
Mon 03 Feb 2014 01:25:44 AM UTC, comment #5: |
Jaakko Kantojärvi <raphendyr> |
Thu 31 Jan 2008 10:16:58 AM UTC, comment #4: I've just tried this code section, and there is a good reason for the "unused variable 'sreg_save'" warning - looking at the generated assembly, the variable is unused. In other words, the SREG is not restored after the block, as it is in the C version.
|
David Brown <davidbrown> |
Thu 31 Jan 2008 02:56:23 AM UTC, comment #3: 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:
|
Tomasz Francuz <tfrancuz> |
Wed 30 Jan 2008 04:14:44 PM UTC, comment #2: I have not seen this warning despite having used this macro in several projects. Are you using C++ Tomasz (I only have C projects)? |
Lars Jonsson <lajon> |
Wed 30 Jan 2008 03:20:35 PM UTC, comment #1: Tomasz,
|
Eric Weddington <arcanum> |
Wed 30 Jan 2008 05:17:06 AM UTC, original submission:
Everytime when using ATOMIC_BLOCK(ATOMIC_RESTORESTATE) macro I have got compiler warning - warning: unused variable 'sreg_save'. I'm using winavr-20071221. |
Tomasz Francuz <tfrancuz> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Follow 9 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2012-11-16 | arcanum | Priority | 5 - Normal | 9 - Immediate | |
2011-02-22 | arcanum | Priority | 7 - High | 5 - Normal | |
Summary | Everytime ATOMIC_BLOCK(ATOMIC_RESTORESTATE) compiler generates warning - unused variable \'sreg_save\' | Everytime ATOMIC_BLOCK(ATOMIC_RESTORESTATE) C++ compiler generates warning - unused variable 'sreg_save' | |||
2010-06-09 | joerg_wunsch | Priority | 3 - Low | 7 - High | |
2010-06-09 | joerg_wunsch | Severity | 3 - Normal | 4 - Important | |
2008-08-11 | arcanum | Priority | 5 - Normal | 3 - Low | |
Release | None | Any | |||
2008-03-17 | arcanum | Category | None | Header | |
2008-01-30 | tfrancuz | Carbon-Copy | - | Added tfrancuz |
Powered by Savane 3.13-f8d8.
Corresponding source code
Can't reproduce this with:
- avr-g++ (GCC) 4.8.1
- avr-libc (debian) 1:1.8.0-4
This bug might have been fixed in avr-gcc as avr-libc haven't changed in time passed.
Just thought it might be good to clean obsolete bugs, thus tested and commented about my resulsts.