Post B42QDi0zbtif0HVHQO by thephd@pony.social
 (DIR) More posts by thephd@pony.social
 (DIR) Post #B42QDi0zbtif0HVHQO by thephd@pony.social
       0 likes, 0 repeats
       
       "There's actually not a negative integer, it's a normal integer with the negation operator applied" is one of those really stupid things I'm kind of annoyed we keep letting be part of the spec.
       
 (DIR) Post #B42QRldkvdG8IjL2Gm by sol_hsa@mastodon.gamedev.place
       0 likes, 0 repeats
       
       @thephd so how do you define max neg int if it's absolute value is bigger than max positive int?
       
 (DIR) Post #B42RxekQBqKM94E3Jg by mirabilos@toot.mirbsd.org
       0 likes, 0 repeats
       
       @sol_hsa @thephd (-2147483647-1) if you use two’s complement, 32 bits, no padding. The parenthesēs are mandatory.
       
 (DIR) Post #B42bUBXEipaIgge0QK by thephd@pony.social
       0 likes, 0 repeats
       
       To be clear: "fixing" this (by making the negative be part of literals) would be a catastrophic breaking change.No way I'd ever propose this.
       
 (DIR) Post #B42c4qiV5SAgpqOb3I by tinylittleenormous@piaille.fr
       0 likes, 0 repeats
       
       @thephd zig fixes this by requiring a Space between ‘-‘ and the litteral. Of course C does not have an official formater so we can’t use this approach. Maybe defining litteral as always evaluated at compile time using infinite précision could do the trick ? ( that’s also what zig does for that matter )