OpenDream icon indicating copy to clipboard operation
OpenDream copied to clipboard

Preprocessor doesnt fold signs next to defines/doesn't add parentheses around defines

Open Furrior opened this issue 7 months ago • 0 comments

The input works fine in byond, the output doesnt. While OD still works with such a code, it probably should be handled at preprocessor step for compatibility. I used --dump-preprocessor --no-standard compiler arguments

#define A -1

/proc/Run_Test()
	ASSERT(-A == 1)

Becomes invalid code

/proc/Run_Test()
	ASSERT(--1 == 1)

Furrior avatar Jul 20 '24 13:07 Furrior