Spot the bug in the MAX_VALUE macro

from C preprocessor
C23 (GCC 13.3.0) intermediate 4 min 1 issue to find

Find the macro bug when either argument has a side effect.

C
#define MAX_VALUE(left, right) \
    ((left) > (right) ? (left) : (right))

int select_next(int *cursor, int limit) {
    return MAX_VALUE((*cursor)++, limit);
}
Open in playground
Report an error