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: Sat, 23 Jul 2016 13:03:39 -0700 Organization: None to speak of Lines: 22 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="29834"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19eJj0SAz+fcetBvLy4MAL0" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:s5U0NJMJSriOmgWuDDXH4eDGGEI= sha1:GVvc+Tj66kRwRNiW7vpacmL6tUk= Xref: csiph.com comp.lang.c:90869 Udyant Wig writes: > On 07/22/2016 01:09 AM, James Kuyper wrote: >> What do you think prefix operators look like? My only expectation for >> prefix operators is that they precede the the thing that they operate >> on, and sizeof certainly meets that criterion. > > From what I read and gathered from that lkml thread, I guess that Linus > Torvalds was objecting to treating sizeof as a prefix operator because > other prefix operators such as prefix ++ and -- operate on lvalues > whereas sizeof, by admitting use of type names, does not (at least not > wholly.) It's not about lvalues. The &, *, +, -, ~, and ! unary operators do not require an lvalue operand. [...] -- 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"