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 wish list Date: Sat, 23 Mar 2019 16:24:01 -0700 Organization: None to speak of Lines: 20 Message-ID: References: <2J7lE.185089$1p7.119303@fx05.am4> <2PalE.135956$Ef4.37063@fx38.am4> <4BqlE.730757$RBa.544247@fx15.am4> <871s2xtzre.fsf@bsb.me.uk> <8SrlE.413614$%B.97090@fx03.am4> <87va09sjff.fsf@bsb.me.uk> <878sx5rz8i.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="77bd598ae72395ba0a7bd923a7887244"; logging-data="17451"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19BnUX2BUfrMeowJZaAf5FN" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:3T8/81bpVplJHCy3bCxjTyrQWs4= sha1:dG6Dato4bz3BacUblj7OZqh418U= Xref: csiph.com comp.lang.c:142323 Bart writes: [...] > But what is the programmer to make of it? You want the behaviour of > 'x>>8' to depend only on the current value of 'x', not be dependent on > what other operations have been done since it was set. The behavior of x>>8 in C depends only on the current value of x. The result is implementation-defined if x is negative, strictly defined if x is non-negative. That assumes the behavior of the program as a whole is not undefined. If you have: x/0; printf("%d\n", x>>8); then the behavior of the program is undefined. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */