|
![](/i/fill.gif) |
On 5/13/2011 0:44, Zeger Knaepen wrote:
> the function "bar" doesn't return anything, so if "foo" returns the
> return-value of "bar", it also doesn't return anything.
And that's exactly why I started this thread. The syntax makes that
distinction, whereas I thought it shouldn't. Turns out that C++ at least
really doesn't make that decision.
Altho given that a simple "return;" from a function declared as returning an
int in C doesn't even raise a warning in gcc, I suspect it's at least as
much the traditional sloppiness of C in terms of parameter passing as it is
something intentionally designed into the spec. ("return 28;" from a void
function gives a warning but not an error.)
--
Darren New, San Diego CA, USA (PST)
"Coding without comments is like
driving without turn signals."
Post a reply to this message
|
![](/i/fill.gif) |