the code:
int32_t v93 = -2147483648;
the error message:
"unary minus operator applied to unsigned type, result still unsigned"
=> More informations about this toot | More toots from typeswitch@gamedev.lgbt
what do I do? what is the blessed way of writing an integer literal with the value of INT32_MIN? (without creating a special case for INT32_MIN)
=> More informations about this toot | More toots from typeswitch@gamedev.lgbt
@typeswitch suffix it?
=> More informations about this toot | More toots from dysfun@treehouse.systems
@dysfun is there a macro for picking out the correct suffix for fixed-size integer types? 🤔
=> More informations about this toot | More toots from typeswitch@gamedev.lgbt
@typeswitch shrug i doubt it. but you can use a long and let it truncate?
=> More informations about this toot | More toots from dysfun@treehouse.systems
@dysfun looks like INT32_C(...) should work, hope it exists in VC
=> More informations about this toot | More toots from typeswitch@gamedev.lgbt
@dysfun nope, that doesn't work. I think i'll just special case INT32_MIN and INT64_MIN. 🙃
For INT32_MIN the LL suffix would work but I think INT64_MIN is going to have the same problem and there's no suffix that'll work there.
=> More informations about this toot | More toots from typeswitch@gamedev.lgbt This content has been proxied by September (3851b).Proxy Information
text/gemini