There is a gcc extention that does it though:
#define val_plus_two(val) ({ val + 2; })
or less trivially
#define fib(x) \
({ __typeof(x) __x = (x), __n0 = 0, __n1 = 0, __n2 = 0, __i; \
for (__i = 0; __i < __x; ++__i) { \
__typeof(x) __t = __n1 + __n0; \
__n0 = __n1; \
__n1 = __n2; \
__n2 = __t; \
}
__n2;
})
which calculates the result in the input type and has no problems
with re-evaluation of the input arguments.
The only problem is that the variables are not statically scoped.
It is, however, good for when the "function" needs to change its
return type or the specifics of the situation demand that the
function is inlined whether optimization is on or not.
r~