This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to conditionally NOAREG a fn?

Hi All.

Imagine a function that looks like this:

DEFINED_SYMBOL1
type FnName(args) DEFINED_SYMBOL2
{
 ...;
}
By appropriate definition of DEFINED_SYMBOL1 and DEFINED_SYMBOL2, I would like to end up with:
type FnName(args)
{
 ...;
}
or
#pragma NOAREGS
type FnName(args) reentrant
{
 ...;
}
The DEFINED_SYMBOL2 part is really easy, either
#define DEFINED_SYMBOL2
or
>#define DEFINED_SYMBOL2 reentrant
But the DEFINED_SYMBOL1 isn't so easy, because C51 won't allow me to
#define DEFINED_SYMBOL1 #pragma NOAREGS
("misused # operator"). So how should I proceed?

BTW, the source file has multiple functuons in it, so compiling with NAREGS on the command line is not an option.

Thanks,

Parents Reply Children
No data