From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/48916 Path: main.gmane.org!not-for-mail From: Raja R Harinath Newsgroups: gmane.emacs.gnus.general Subject: Re: format called for effect Date: Tue, 07 Jan 2003 23:12:10 -0600 Sender: owner-ding@hpc.uh.edu Message-ID: References: <84ptrbqte8.fsf@lucy.cs.uni-dortmund.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1042002725 23222 80.91.224.249 (8 Jan 2003 05:12:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 8 Jan 2003 05:12:05 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18W8VY-00062Q-00 for ; Wed, 08 Jan 2003 06:12:04 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 18W8Vx-0000cl-00; Tue, 07 Jan 2003 23:12:29 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 07 Jan 2003 23:13:23 -0600 (CST) Original-Received: from sclp3.sclp.com (sclp3.sclp.com [66.230.238.2]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id XAA13102 for ; Tue, 7 Jan 2003 23:13:12 -0600 (CST) Original-Received: (qmail 22872 invoked by alias); 8 Jan 2003 05:12:14 -0000 Original-Received: (qmail 22867 invoked from network); 8 Jan 2003 05:12:14 -0000 Original-Received: from mail.cs.umn.edu (128.101.32.202) by 66.230.238.6 with SMTP; 8 Jan 2003 05:12:14 -0000 Original-Received: from bose.cs.umn.edu (bose.cs.umn.edu [128.101.35.195]) by mail.cs.umn.edu (Postfix) with ESMTP id CBFED11319 for ; Tue, 7 Jan 2003 23:12:10 -0600 (CST) Original-Received: by bose.cs.umn.edu (Postfix, from userid 818) id 968ED3202; Tue, 7 Jan 2003 23:12:10 -0600 (CST) Original-To: ding@gnus.org In-Reply-To: (Lars Magne Ingebrigtsen's message of "Wed, 08 Jan 2003 04:53:54 +0100") User-Agent: Gnus/5.090011 (Oort Gnus v0.11) Emacs/21.3.50 (i686-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:48916 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:48916 Hi, Lars Magne Ingebrigtsen writes: > Raja R Harinath 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