Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: A glitch regarding the usual malloc() idiom Date: Sun, 24 Jul 2016 14:17:03 -0700 Organization: None to speak of Lines: 26 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="1429"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ujNdg5yJKahFsUW/R2kq5" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:L7SdTpyHYoTzJnzFFTEvAotN9jo= sha1:wiPrfeOQqtq1CVHPJttz3uwWfR0= Xref: csiph.com comp.lang.c:90914 Tim Rentsch writes: > Keith Thompson writes: [...] >> It's not about lvalues. The &, *, +, -, ~, and ! unary operators >> do not require an lvalue operand. >> >> [...] > > The unary & operator almost requires an lvalue, at least > implicitly. The only exception is expressions of function type, > which are kind of "lvalues for functions". And & is like {++,--} > in that applying & to a cast expression is never valid. You're right, of course; I just missed that. > All of that is incidental to your point, I just thought it might > be interesting. Indeed. And my previous statement still applies to unary *, +, -, ~, and !. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"