Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: One over another: (*structp).component structp->component Date: Wed, 18 Nov 2015 09:05:52 -0800 Organization: None to speak of Lines: 33 Message-ID: References: <878u64n78r.fsf@bsb.me.uk> <0a2f46e2-0de1-4c7e-964b-37a649091ebe@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="23269"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX193BDM22IB3ASyN7zrCci1z" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:tG//5blVf924BHr/2GUd6pXxkqc= sha1:XyV6UhKxiCR9PHHVIKuAiqS6EZw= Xref: csiph.com comp.lang.c:76424 glen herrmannsfeldt writes: > James Kuyper wrote: [...] >> If a function designator always gets converted into a pointer to >> function, how can you ever call it? You can call it because there was a >> corresponding change to the rule for function calls in C99: It's already been pointed out that the change was in C89, not C99. > Even more, how can you call f(x)? > > Doesn't that f (function, not pointer) get converted, too? Yes, it does. The prefix of a function call must be a pointer-to-function. The most common case is that it's a function name, which is implicitly converted from function type to pointer-to-function type. (That conversion is conceptual, and is unlikely to be visible in the generated code.) [...] > (I presume that *&2 still doesn't work.) Correct. The operand of `&` must be an lvalue, which `2` isn't. (It's not an object, so it doesn't have an address.) [...] -- 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"