From owner-freebsd-audit Wed Feb 7 16: 8:44 2001 Delivered-To: freebsd-audit@freebsd.org Received: from gw.nectar.com (gw.nectar.com [208.42.49.153]) by hub.freebsd.org (Postfix) with ESMTP id 8766A37B65D for ; Wed, 7 Feb 2001 16:08:26 -0800 (PST) Received: by gw.nectar.com (Postfix, from userid 1001) id 05C8718C93; Wed, 7 Feb 2001 18:08:25 -0600 (CST) Date: Wed, 7 Feb 2001 18:08:25 -0600 From: "Jacques A. Vidrine" To: Warner Losh Cc: Mike Heffner , FreeBSD-audit Subject: Re: lam(1) patch Message-ID: <20010207180825.A85807@spawn.nectar.com> Mail-Followup-To: "Jacques A. Vidrine" , Warner Losh , Mike Heffner , FreeBSD-audit References: <200102072318.f17NIj996425@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200102072318.f17NIj996425@harmony.village.org>; from imp@harmony.village.org on Wed, Feb 07, 2001 at 04:18:45PM -0700 X-Url: http://www.nectar.com/ Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Feb 07, 2001 at 04:18:45PM -0700, Warner Losh wrote: > The tolower function will only evaluate the arguments once, but the > tolower macro might evaluate them multiple times. Maybe I'm recalling > things too far back. C99 7.1.4.1 says, ``Any invocation of a library function that is implemented as a macro shall expand to code that evaluates each of its arguments exactly once, fully protected by parentheses where necessary, so it is generally safe to use arbitrary expressions as arguments.'' Our tolower is implemented as an inline. I'd like to know when this was first spelled out -- I don't have a C89 reference handy. Cheers, -- Jacques Vidrine / n@nectar.com / jvidrine@verio.net / nectar@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message