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, 09 Feb 2024 20:17:51 -0800 Organization: None to speak of Lines: 22 Message-ID: <87fry1c5qo.fsf@nosuchdomain.example.com> References: <87r0hlef8q.fsf@nosuchdomain.example.com> <87jzndc5sq.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: dont-email.me; posting-host="3b6abb86f0f3816027ad8c34cf97d3ff"; logging-data="3194447"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+XMZQgSk9MC54zmpizJCzV" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:fqieX6LAw04sTkKPoGAelGRnCv0= sha1:K08QQvnsHNgdKyIL5eTmp3kh8iQ= Xref: csiph.com comp.lang.c:382259 Keith Thompson writes: > Lawrence D'Oliveiro writes: >> On Fri, 09 Feb 2024 09:09:41 -0800, Keith Thompson wrote: >>> But it's far too late to fix that in any language called "C". >> >> I had a look at the MISRA specs, and they say “assignment operators shall >> not be used in expressions that yield a boolean value”. > > I presume they mean expressions used as conditions, but unless they > define what they the phrase "boolean value" somwhere, that's not what > they wrote. Editing error. I presume they mean expressions used as conditions, but unless they define what they *mean by* the phrase "boolean value" somwhere, that's not what they wrote. -- 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 */