Yesterday (at least) 8 of you learned that INT_MIN/-1 signed-integer-overflows
https://tech.lgbt/@fay59/113807449673594867
=> More informations about this toot | More toots from fay59@tech.lgbt
@fay59
fun fact 1: you can -fwrapv and it still traps
fun fact 2: you can -std=c99 and INT_MIN%-1 still traps too
=> More informations about this toot | More toots from void_friend@tech.lgbt
@void_friend fun fact 1 seems like a -fwrapv bug. It’s an x86-ism that division overflow traps (ARM CPUs don’t) that is enabled by signed integer overflow being UB, the compiler isn’t doing its job properly if it promises it’s not UB and it still traps
=> More informations about this toot | More toots from fay59@tech.lgbt
@fay59 isn't -std=c99 a promise too?
=> More informations about this toot | More toots from void_friend@tech.lgbt
@fay59 i can report it and blame Félix for fun, but what are they going to do, make it so with -fwrapv INT_MiN/-1 doesn't trap but % still does because it doesn't even wraparound? They don't want to fix it and they won't.
=> More informations about this toot | More toots from void_friend@tech.lgbt
@void_friend possibly! I don’t know what C99 says about this off the top of my head
=> More informations about this toot | More toots from fay59@tech.lgbt This content has been proxied by September (ba2dc).Proxy Information
text/gemini