I am kind of confused about using the _at_ keyword to assign a specific address to a variable.
so for example :
extern xdata char variable _at_ 0x000f;
it fills 3 bytes in xram . can any one explain how is the compiler handling these sequence. Thank you !
Why should "the standard" contain any information on how a C compiler handles non-standard extensions?
'extern' is not a non-standard extension. It's probably better if you don't snip away the context like that.
'extern' is not a non-standard extension.
Come on. You know that I was not referring to extern.
It's probably better if you don't snip away the context like that.
The context says that Erik should compile a line that contains not just one, but two blindingly obvious non-standard keywords and look at the resulting assembly, and that he would find the explanation for the results in "the standard".
Yes?
Yes, but equally you know that I was not referring to __at__.
Yes. The code posted does not behave the way he thinks it does, this is because of is his misunderstanding of 'extern'.
"Warning--A message emitted by a compiler to try and convince the programmer that some program construct is likely confusing, wrong, or dangerous. Because of the serious nature of warnings, most compilers have a provision to turn most of them off. The rest typically go to /dev/null."
You were referring to a declaration that contains non-standard keywords, and basically by definition the standard cannot describe what the compiler should do with such a line.
Interestingly enough, the compiler documentation contains detailed examples on how to define variables using the _at_ keyword, and how to use these variables in a different source file than they were declared in.
You are missing the point. The issue in hand is that the 'extern' keyword, when applied to a variable definition, does not make it an "extern ref".
I should hope the manual documents the usage of all non-standard extensions.