Path: csiph.com!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: you think rust may outthrone c? Date: Wed, 26 Jul 2023 18:03:00 -0700 Organization: None to speak of Lines: 28 Message-ID: <87o7jyp3nf.fsf@nosuchdomain.example.com> References: <87jzuvsg7q.fsf@nosuchdomain.example.com> <87h6pyqgnp.fsf@nosuchdomain.example.com> <878rbaqch6.fsf@nosuchdomain.example.com> <87351foebi.fsf@bsb.me.uk> <87o7k2l4ge.fsf@bsb.me.uk> <87o7k0kbq5.fsf@bsb.me.uk> <87cz0gj8wl.fsf@bsb.me.uk> <87bkfyi5f0.fsf@bsb.me.uk> MIME-Version: 1.0 Content-Type: text/plain Injection-Info: dont-email.me; posting-host="f8957b03f6dc45951cee385c25f0e511"; logging-data="1735577"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ORLOkH7JkKDeJ1BbAOQg1" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:UPrvldUju4gW0mc0FNEsDG545Bk= sha1:uj88bD1vyqGapeY0JSibmA4sLU8= Xref: csiph.com comp.lang.c:171320 Bart writes: [...] > To get back to my point, I will reassert that I think that: > > *(int*)1234567 > > is what I would call 'undefined behaviour', since I couldn't tell you > what would happen if executed. > > But evaluating: > > INT_MAX+1 > > is NOT what I would call 'undefined behaviour'; whatever unexpected > things you might observe in such programs, is the deliberate intention > of the compiler. Since actual hardware UB on signed overflow is rare. Would you consider using a term other than "undefined behavio[u]r" for whatever it is you're referring to? If not, is it because you're being intentionally difficult? (These are both serious questions.) -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */