Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Feb 2001 18:08:25 -0600
From:      "Jacques A. Vidrine" <n@nectar.com>
To:        Warner Losh <imp@harmony.village.org>
Cc:        Mike Heffner <mheffner@vt.edu>, FreeBSD-audit <FreeBSD-audit@FreeBSD.ORG>
Subject:   Re: lam(1) patch
Message-ID:  <20010207180825.A85807@spawn.nectar.com>
In-Reply-To: <200102072318.f17NIj996425@harmony.village.org>; from imp@harmony.village.org on Wed, Feb 07, 2001 at 04:18:45PM -0700
References:  <XFMail.20010207180049.mheffner@vt.edu> <200102072318.f17NIj996425@harmony.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010207180825.A85807>