From owner-svn-src-all@FreeBSD.ORG Tue Aug 10 14:59:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EEF51065672; Tue, 10 Aug 2010 14:59:11 +0000 (UTC) (envelope-from neelnatu@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 9C0618FC15; Tue, 10 Aug 2010 14:59:10 +0000 (UTC) Received: by wwb13 with SMTP id 13so1390395wwb.31 for ; Tue, 10 Aug 2010 07:59:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=BULCBLm9KRe3M3tWi8wC4n4IYds5jrBn73UMIz9cYNE=; b=tcTMyxukG+8B26HC1zcJpk0LfuPrQJq0uhf/cHmsaVxGYeU1C8EUvjRSGYzdERz+29 Zi+V0M0OmoBpyRSv/cqFnx0klVN+lNEqTC769me9MwxipauNyI7IGABRpK5nWgkjpuH5 bh6dSEaWABkMgUsuJMrvLjhWx3fpKojnXuNd8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=oxPDPMx4dqh/+r9BJr6Rm6y9Cluyiuovu4H8Q2OuXWnJ0ySWkDOBlE8D0qBbgwPxY/ IGsfpa7vlEBQ1ENyAOCWk9Jg6CZo3k3/vP9VH8XmY/Iy3L/j5HQbMC8cuL4I/SB6b+tz gD5nAMTiejvQ7GXAG8SRyXQEmosnb8XTwIJ7g= MIME-Version: 1.0 Received: by 10.216.153.140 with SMTP id f12mr3060275wek.111.1281452348391; Tue, 10 Aug 2010 07:59:08 -0700 (PDT) Received: by 10.216.80.8 with HTTP; Tue, 10 Aug 2010 07:59:08 -0700 (PDT) In-Reply-To: <20100810215430.U10154@delplex.bde.org> References: <201008100515.o7A5FZZF017552@svn.freebsd.org> <20100810062829.GA1737@mole.fafoe.narf.at> <20100810074210.GC1737@mole.fafoe.narf.at> <20100810215430.U10154@delplex.bde.org> Date: Tue, 10 Aug 2010 07:59:08 -0700 Message-ID: From: Neel Natu To: Bruce Evans Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Stefan Farfeleder , src-committers@freebsd.org, "Jayachandran C." Subject: Re: svn commit: r211130 - head/libexec/rtld-elf/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Aug 2010 14:59:11 -0000 Hi, On Tue, Aug 10, 2010 at 5:00 AM, Bruce Evans wrote: > On Tue, 10 Aug 2010, Stefan Farfeleder wrote: > >> On Tue, Aug 10, 2010 at 12:55:38PM +0530, Jayachandran C. wrote: >>> >>> I think there is a problem in =A0sys/mips/include/_endian.h >>> -- >>> #define __bswap16(x) =A0 =A0(__uint16_t)(__is_constant(x) ? =A0 =A0 =A0= =A0 \ >>> =A0 =A0 =A0 =A0__bswap16_const((__uint16_t)x) : =A0__bswap16_var((__uin= t16_t)x)) >>> #define __bswap32(x) =A0 =A0(__uint32_t)(__is_constant(x) ? =A0 =A0 =A0= =A0 \ >>> =A0 =A0 =A0 =A0__bswap32_const((__uint32_t)x) : =A0__bswap32_var((__uin= t32_t)x)) >>> #define __bswap64(x) =A0 =A0(__uint64_t)(__is_constant(x) ? =A0 =A0 =A0= =A0 \ >>> =A0 =A0 =A0 =A0__bswap64_const((__uint64_t)x) : =A0__bswap64_var((__uin= t64_t)x)) >>> -- >>> >>> I'm not sure why the cast is needed, but we should have a braces >>> around x, unless I'm completely mistaken. > > And not around x in callers. > >> I agree. And around the entire expression too. > > I agree. =A0But I've never seen a case where foo(x) needs to be (foo(x)) > (where foo is not a macro). =A0'()' has highest precedence for expression= s > (not sure about for parameter lists) together with `[]' `->' and '.', and > it is hard to think of an expression with any of the latter close enough > to foo(x) to cause problems. > > Bruce > Ok, thanks to everybody for their input. I'll make the suggested changes to sys/mips/include/_endian.h instead. best Neel