Re: Integer Promotions
- From: Richard Heathfield <rjh@xxxxxxxxxxxxxxx>
- Date: Fri, 28 Sep 2007 10:27:54 +0000
Philip Potter said:
Richard Heathfield wrote:<snip>
Fred said:
<snip>(void) (u=10); /* set u to 10 */
(4. And as usual we discard the value of the assigment expression)
That isn't actually "as usual". Hardly anyone does that, as it's utterly
pointless.
No, I disagree. It's quite sensible to discard the value of the
assignment expression, because the assignment itself was the purpose of
the statement.
Casting the assignment to void, however, is pointless. Luckily, it isn't
necessary to do this in order to discard the value.
Ach! Out-pedanted again! (And you are, of course, perfectly correct.)
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
.
- References:
- Integer Promotions
- From: Fred
- Re: Integer Promotions
- From: Richard Heathfield
- Re: Integer Promotions
- From: Philip Potter
- Integer Promotions
- Prev by Date: Is there any problem if the compile line sees two '-o' 's
- Next by Date: Re: Integer Promotions
- Previous by thread: Re: Integer Promotions
- Next by thread: Re: Integer Promotions
- Index(es):
Relevant Pages
|
|