Compiler warning: unsequenced modification
hrydgard opened this issue · comments
Archs\MIPS\PsxRelocator.cpp:53:26:
skip += input[pos+skip++];
Having skip++ in an expression assigned to skip itself is not safe. Would be nice to get it cleaned up to avoid getting a warning when building.
Yeah, I've run across that terrible line before... last time I looked at it I wasn't entirely sure what to actually replace it with (which kind of shows why it's a problem to have). But seeing different compiler outputs, almost all of them use the equivalent of skip += 1+input[pos+skip]
, so that seems to be the safest bet. Only exception I've seen was an old GCC version for ARM, which translated the whole statement to ++skip
...