Is it possible to create a C preprocessor macro that evaluates to an increasing number depending on how often it was called? It should be compile-time only.
I'd like something like:
#define INCREMENT() ....
#define INCRVALUE ....
INCREMENT()
INCREMENT()
i = INCRVALUE;
// ...
INCREMENT()
// ...
j = INCRVALUE;
and afterwards i == 2 and j == 3.