Ancestors

Written by Félix on 2025-01-12 at 19:56

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

Written by void friend on 2025-01-12 at 20:04

@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

Written by Félix on 2025-01-12 at 20:15

@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

Toot

Written by void friend on 2025-01-12 at 20:27

@fay59 isn't -std=c99 a promise too?

=> More informations about this toot | More toots from void_friend@tech.lgbt

Descendants

Written by void friend on 2025-01-12 at 20:35

@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

Written by Félix on 2025-01-12 at 20:47

@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

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113817268612505901
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
284.828947 milliseconds
Gemini-to-HTML Time
0.765935 milliseconds

This content has been proxied by September (ba2dc).