Path: csiph.com!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c++,comp.lang.c Subject: Re: lvalue assignment difference between C and C++ Date: Mon, 06 Feb 2023 12:47:31 -0800 Organization: None to speak of Lines: 32 Message-ID: <87zg9qed24.fsf@nosuchdomain.example.com> References: <0mvDL.68810$b7Kc.34465@fx39.iad> MIME-Version: 1.0 Content-Type: text/plain Injection-Info: reader01.eternal-september.org; posting-host="181ea74528ed435ea473c00f282e1c24"; logging-data="3366995"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18GpLVxKnEX+ixAog37Mj/q" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:iQCwsLKxo/E+wQWdEN99CIMY9Dg= sha1:BQ95dLNQNZMSS7PAV83qmRDzFyw= Xref: csiph.com comp.lang.c++:88992 comp.lang.c:169205 Muttley@dastardlyhq.com writes: > On Mon, 6 Feb 2023 14:13:51 +0100 > David Brown wrote: >>On 06/02/2023 10:26, Muttley@dastardlyhq.com wrote: >>> On Sun, 5 Feb 2023 11:42:04 +0100 >>> David Brown wrote: >>>> On the other hand, the vast majority of C compilers are /not/ C++ >>> >>> Ok, I should have said most of the *common* C++ compilers are also C >>compilers. >>> >> >>No, that would still be wrong. You should have said - as I wrote - that >>most C++ compilers have a C compiler as part of their toolchain packages. > > You're splitting hairs. "Compiler" for most people is the entire toolchain, > not one particular part of it. Perhaps, but the reason you said that most C compilers are also C++ compilers (or however you phrased it) was to support the idea that it would be trivial to implement rvalue conditional expressions in C. The part of a C compiler that implements conditional expressions is, in all cases I'm aware of, distinct from the part of a C++ compiler that implements conditional expressions. Possibly some code could be borrowed, but it's not just a matter of turning off a restriction. The "entire toolchain" is not relevant to the point you raised. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for XCOM Labs void Void(void) { Void(); } /* The recursive call of the void */