Nov 27, 2013
05:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 27, 2013
05:38 AM
When trying to access a specified register in GCC the syntax is given clearly. Here an example:
volatile register uint32 R2 asm ("r2");
This line gets flagged by the code-checker stating that the label "r2" is ignored because R2 is an automatic variable.
Instead declaring
static volatile register uint32 R2 asm ("r2");
is accepted and no error displayed.
But when compiled, the first declaration is error-free and the register can be accessed from C without any problems, while the second declaration is flgges as an error.
I admit that this issue will only touch the "Cracks", but the truth is: I am one.
Bob
PS: before hitting the "Post"-button everything looks nice, let's see whether the text gets clobbered.
6 Replies