Re:Using signed or unsigned int by default in C (2015)
by andreareina on Wednesday August 24, 2022 @09:17AM
(#32579063)
That's the first time I've heard that reason for int overflow being UB, do you have a source for that?
Re:Using signed or unsigned int by default in C (2015)
by jcelerier on Thursday August 25, 2022 @03:24AM
(#32590674)
how do you call something that verifies those as axioms? https://gcc.godbolt.org/z/53ben65hf
which is exactly why signed overflow is UB: if you use int, you say "I want something that behaves exactly like a mathematical integer in exchange of the promise of not working with quantities too large"