Re: Void function returns value



"André Gillibert" <tabkanDELETETHISnaz@xxxxxxxxxxxxxxxxxx> writes:
Keith Thompson wrote:
If the function name is the operand of a unary "&", the implicit
conversion does not take place, so ``&foo'', like ``foo'' yields the
address of the function. ``&foo'' and ``foo'' are equivalent; neither
calls the function. ``&foo()'' and ``foo()'' are equivalent; both
call the function.

No. &foo() is equivalent to &(foo()) which is a constraint violation.

You're right; thanks for the correction.

``(&foo)()'' and ``foo()'' are equivalent.

--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.



Relevant Pages

  • Re: Void function returns value
    ... André Gillibert wrote: ... Keith Thompson wrote: ... conversion does not take place, so ``&foo'', like ``foo'' yields the ...
    (comp.lang.c)
  • Re: Void function returns value
    ... conversion does not take place, so ``&foo'', like ``foo'' yields the ... You're right; thanks for the correction. ... Chqrlie ...
    (comp.lang.c)
  • Re: Sequence Point before actual function call
    ... Expressions, and it seems that 'result' is used practically ... These operators yield values that depend on the internal ... Correction: that's in 6.5.3.2p3. ... The unary & operator yields the address of its operand. ...
    (comp.lang.c)
  • Re: signed and unsigned Sign bit doubt
    ... this conversion is done implicitly. ... yields the same value. ... In many implementations, the value of i will be -25536. ... assuming a 2's-complement representation for ...
    (comp.lang.c)
  • Re: Raw Convertors
    ... barrel distortion correction into their proprietary RAW ... Yet bat least both Canon and Nikon supply SDKs with conversion ... In the case of Linux support, the cost is zero. ...
    (rec.photo.digital)