There are probably hundreds of ways to pass an expression with side effects, but a "credible" one would be something like:
FILE *files[NUM_FILES];
...
int rc = getc(files[counter++]);
If getc
is implemented poorly as a macro, the expression files[counter++]
could be evaluated more than once, leading to unexpected behavior.