From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8520 invoked by alias); 26 Apr 2002 17:34:48 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 8497 invoked from network); 26 Apr 2002 17:34:46 -0000 Received: from unknown (HELO nondot.org) (64.5.103.85) by sources.redhat.com with SMTP; 26 Apr 2002 17:34:46 -0000 Received: by nondot.org (Postfix, from userid 501) id A97FB11883; Fri, 26 Apr 2002 12:31:39 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by nondot.org (Postfix) with ESMTP id A530D1183E; Fri, 26 Apr 2002 12:31:39 -0500 (CDT) Date: Fri, 26 Apr 2002 10:35:00 -0000 From: Chris Lattner To: Magnus Fromreide Cc: Kris Warkentin , Subject: Re: pure and const functions In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-04/txt/msg01435.txt.bz2 On Fri, 26 Apr 2002, Magnus Fromreide wrote: > On Fri, 26 Apr 2002, Chris Lattner wrote: > > But those presumably would not be pure or const, would they? > > Possibly, but given the definitions in the original post fprintf is pure > and it is also partial since you can't foresee what odd devices there > might be to write to. fprintf isn't pure though, it modifies global buffers, calls syscalls, and otherwise has a lot of side effects... I wouldn't want: fprintf(stdout, "hello world\n"); to be eliminated because I don't use the return value of fprintf. :) -Chris http://www.nondot.org/~sabre/os/ http://www.nondot.org/~sabre/Projects/