Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: C String terminator Date: Sat, 11 Apr 2020 15:08:51 -0700 Organization: None to speak of Lines: 17 Message-ID: <87d08dk74c.fsf@nosuchdomain.example.com> References: <2edf2e71-9692-4d9a-a112-23f8ad6b50e1@googlegroups.com> <895233b7-8933-44ca-a8e9-c5cc980ec876@googlegroups.com> <673b0629-b32e-4391-9e10-93a6e3b00ffe@googlegroups.com> <89841304-79c4-43a3-9bec-d5eab27c4a08@googlegroups.com> <3gIjG.348315$mJ2.342434@fx23.iad> <730c5155-f371-4c0d-985d-ca0e845878d4@googlegroups.com> <3aaa1e27-88f4-4134-bd9c-539f7a72fb8e@googlegroups.com> <9c2efce8-e36e-477d-b768-c412d658b6fa@googlegroups.com> <4b9b90a0-0393-41de-8857-1f8e379e4d79@googlegroups.com> <2IokG.1296436$ek.27835@fx48.iad> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="9e0e7bbb14dcd275807e96284b4c31ae"; logging-data="9616"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19BNUpv7mzqALYvb6bN/VlV" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cancel-Lock: sha1:JXllPFDbmXYEgEZjXmqX89SzeOc= sha1:MSa2gQR1/ROYEPR0rS4xiqu9HZE= Xref: csiph.com comp.lang.c:151296 Richard Damon writes: [...] > This simple question of what is the natural result of 20,000 + 20,000 > has two possible answers on common current machines, 40,000 and -25,536 > (on a machine with 16 bit integers). [...] For certain meanings of "natural result". In C semantics, the possible answers are 40000 and undefined behavior. (Or just 0 if those commas are comma operators, but I've decided not to be quite that pedantic.) -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */