Re: Void function returns value
- From: Keith Thompson <kst-u@xxxxxxx>
- Date: Tue, 30 Oct 2007 17:06:45 -0700
"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"
.
- Prev by Date: Re: doubt regarding sizeof operator
- Next by Date: Re: C return a++ - is it safe?
- Previous by thread: Please help me to find the error
- Next by thread: Re: Void function returns value
- Index(es):
Relevant Pages
|