Path: csiph.com!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: How About Disallowing Assignments In Expressions? Date: Fri, 16 Feb 2024 16:52:51 -0800 Organization: None to speak of Lines: 30 Message-ID: <8734tr9ajg.fsf@nosuchdomain.example.com> References: <8734tzoli4.fsf@bsb.me.uk> <87v86vbx6s.fsf@nosuchdomain.example.com> <87il2vbvza.fsf@nosuchdomain.example.com> <87il2s9fdj.fsf@nosuchdomain.example.com> <86wmr6z0zg.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: dont-email.me; posting-host="7f82d3b22f722edfb054614ec1dbacd0"; logging-data="110655"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19JZJsZxC8cT3xd1Pp9E2WU" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:JjhNJsejUZxr2vUygy9gi0SUtSA= sha1:vZ95bZ8qW912UQrvouMSIoIg37o= Xref: csiph.com comp.lang.c:382605 Malcolm McLean writes: > On 16/02/2024 20:20, Chris M. Thomasson wrote: >> On 2/15/2024 5:16 PM, Lawrence D'Oliveiro wrote: >>> On Thu, 15 Feb 2024 16:41:23 +0000, Malcolm McLean wrote: >>> >>>> I can't remember the precedence relationships beyond a few very >>>> conventional and well known ones. >>> >>> No need to. This is why we have documentation. Keep it handy, and >>> don’t be >>> ashamed to refer to it often, even in the presence of colleagues. >> Agreed. In fact, double checking something in front of colleagues >> might make them feel better, so to speak. Too ashamed to double >> check something can lead to errors, bug, oh my! :^) > > Usually it's pretty clear what the expression should say, so whip > parentheses in. Rerun. If behaviour changes, that was your bug. If > not, at least you've made it clearer. But you never actually find out > what the precedence relations are. Is that a joke? Would you seriously add parentheses to an expression and re-run to see if the behavior changes *without bothering to look up the actual precedence rules*? -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Medtronic void Void(void) { Void(); } /* The recursive call of the void */