From: Steve Graegert <graegerts@gmail.com>
To: Luiz Fernando Capitulino <lcapitulino@conectiva.com.br>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: ternary operator
Date: Tue, 28 Jun 2005 20:24:45 +0200 [thread overview]
Message-ID: <6a00c8d505062811248ef2845@mail.gmail.com> (raw)
In-Reply-To: <42C185B6.4020005@conectiva.com.br>
On 6/28/05, Luiz Fernando Capitulino <lcapitulino@conectiva.com.br> wrote:
> Steve Graegert wrote:
>
> > Just take a look at our discussion about implicit return values on
> > int- and void-valued functions a week or two ago. If no return value
> > is given explicitly it is undefined and in most cases not zero,
> > therfore not yielding false. It's chosen randomly.
>
> Yes, but note that this happens because the default return value
> for functions is 'int'. So, if you change func2()'s prototype to
> return 'void', the compiler will give you a warning.
Exactly what has been discussed by Glynn, me and others a couple of
days ago. The reference to void-valued functions was made to reflect
the nature of the discussion that has taken place before; it has no
significance in this thread.
> PS: This is not the case for the arguments, in that case func2() it's
> able to accept anything (IIRC).
As stated in the answer to James Colannino's question on function prototyping.
Kind Regards
\Steve
--
Steve Graegert <graegerts@gmail.com> || <http://www.technologies.de/~sg/>
Independent Software Consultant {C/C++ && Java && .NET}
Mobile: +49 (176) 21 24 88 69
Office: +49 (9131) 71 26 40 9
next prev parent reply other threads:[~2005-06-28 18:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-28 17:22 ternary operator Vadiraj
2005-06-28 17:44 ` Ron Michael Khu
2005-06-28 17:49 ` Steve Graegert
2005-06-28 17:15 ` Luiz Fernando Capitulino
2005-06-28 18:24 ` Steve Graegert [this message]
2005-06-28 18:24 ` Vadiraj
2005-06-28 18:47 ` Steve Graegert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6a00c8d505062811248ef2845@mail.gmail.com \
--to=graegerts@gmail.com \
--cc=lcapitulino@conectiva.com.br \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.