Gnus development mailing list
 help / color / mirror / Atom feed
From: Raja R Harinath <harinath@cs.umn.edu>
Subject: Re: format called for effect
Date: Tue, 07 Jan 2003 23:12:10 -0600	[thread overview]
Message-ID: <d9u1gkql79.fsf@bose.cs.umn.edu> (raw)
In-Reply-To: <m31y3oguul.fsf@quimbies.gnus.org> (Lars Magne Ingebrigtsen's message of "Wed, 08 Jan 2003 04:53:54 +0100")

Hi,

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Raja R Harinath <harinath@cs.umn.edu> writes:
>
>> It doesn't.  And that seems to be the point of the overly cleverly
>> worded warning.  It think the warning says
>>
>>   "you want a side-effect there, but 'format' ain't gonna do it for you"
>
> Yeah, probably.  It's a kinda strange thing to warn about -- did
> anyone ever think that doing a `format' would have a side effect?

It makes sense to warn in the case where you call to a pure (no
side-effects) function, and then discard the value.  Apparently, the
compiler figured out that the call to 'format' would be an expensive
no-op in that context, and that's why it complained.

It is just that the wording of the warning is wierd enough that you
put the blame on the callee (by worrying about 'format' in this case),
rather than the call site, where the problem actually is.

- Hari
-- 
Raja R Harinath ------------------------------ harinath@cs.umn.edu



  reply	other threads:[~2003-01-08  5:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-05 19:38 Kai Großjohann
2003-01-06  2:20 ` Lars Magne Ingebrigtsen
2003-01-07  7:25   ` Kai Großjohann
2003-01-08  3:52     ` Lars Magne Ingebrigtsen
2003-01-07 17:02   ` Raja R Harinath
2003-01-08  3:53     ` Lars Magne Ingebrigtsen
2003-01-08  5:12       ` Raja R Harinath [this message]
2003-01-08  6:12       ` Kai Großjohann
2003-01-08  9:19         ` Lars Magne Ingebrigtsen

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=d9u1gkql79.fsf@bose.cs.umn.edu \
    --to=harinath@cs.umn.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).