Wrap a pars around it.
(abs)(whatever);
This will force the compiler to use the version of the function because the macro no longer matches.
Functional macros work by matching the identifier with the next left character ( . Since we wrapped the function name in parens, instead we have an identifier followed by the right paragraph ) that does not match the macro. Paranas are semantically transparent, but they interfere with macro syntax.
IIRC, it was the C splint controller who taught this to me. When writing the postscript interpreter, I created beautiful short macros to access the stack.
#define push(o) (*tos++ = (o)) #define pop() (*--tos)
Which were great to complex parts, where they were part of an expression involving tos . To avoid undefined behavior, I had to create functional versions and use them for these complex spots. For the new design, I completely skipped the macros.
Editing: I have a stunning feeling that this is actually a book by Koleokant (Peter Van Der Linden Deep C Secrets), where I found out about this, and the above situation was where I first needed it. His example IIRC involved putchar or getchar , which are often implemented as both functions and macros according to C implementations.
source share