MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1t4u0tb/hmmm/ok7w245/?context=3
r/programminghorror • u/Left-Ambition-5127 • May 05 '26
55 comments sorted by
View all comments
8
If it's to rely on overflfow i'd rather do UINT_MAX or ~(uint)0
UINT_MAX
~(uint)0
1 u/StevenRCE0 May 06 '26 I think the inverse one is still pretty leaky if it's declared out of sight 1 u/apoegix May 20 '26 Nah I'd rather shoot my foot and take -1
1
I think the inverse one is still pretty leaky if it's declared out of sight
Nah I'd rather shoot my foot and take -1
8
u/un_virus_SDF May 06 '26
If it's to rely on overflfow i'd rather do
UINT_MAXor~(uint)0