I am using mcs908QE128 (on a demoqe board)
If I have:
#pragma inline
// Read the content of a memory address
char flash_read(unsigned int address)
{
unsigned char *pointer;
pointer = (char*) address;
return (*pointer);
}
I get the warning above warning ( warning:C4201 pragma inline was not handled)
Does inlining not work for this device (or compiler)
thanks
Russell
已解决! 转到解答。
Pragma's names are case sensitive, inline and INLINE is not the same. And in the answer above, I meant to mention that there is a pragma INLINE, I noticed I typed INTERRUPT instead.
Use (I did not try this out)
#pragma INLINE
// Read the content of a memory address
char flash_read(unsigned int address)
{
const char *pointer;
pointer = (const char*) address;
return (*pointer);
}
That's exactly what it means, the compiler does not recognize the inline pragma.
Note that the S08 compiler does know the pragma INTERRUPT (all uppercase).
Check the compiler manual for the s08 for a list of supported pragmas, it has a chapter "Compiler Pragmas".
Daniel
Pragma's names are case sensitive, inline and INLINE is not the same. And in the answer above, I meant to mention that there is a pragma INLINE, I noticed I typed INTERRUPT instead.
Use (I did not try this out)
#pragma INLINE
// Read the content of a memory address
char flash_read(unsigned int address)
{
const char *pointer;
pointer = (const char*) address;
return (*pointer);
}