From owner-svn-src-all@FreeBSD.ORG Tue Aug 10 12:00:20 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 27F661065739; Tue, 10 Aug 2010 12:00:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 3C6C68FC17; Tue, 10 Aug 2010 12:00:18 +0000 (UTC) Received: from c122-106-147-41.carlnfd1.nsw.optusnet.com.au (c122-106-147-41.carlnfd1.nsw.optusnet.com.au [122.106.147.41]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o7AC08t1019716 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Aug 2010 22:00:12 +1000 Date: Tue, 10 Aug 2010 22:00:08 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Stefan Farfeleder In-Reply-To: <20100810074210.GC1737@mole.fafoe.narf.at> Message-ID: <20100810215430.U10154@delplex.bde.org> References: <201008100515.o7A5FZZF017552@svn.freebsd.org> <20100810062829.GA1737@mole.fafoe.narf.at> <20100810074210.GC1737@mole.fafoe.narf.at> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, "Jayachandran C." , Neel Natu 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 12:00:20 -0000 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 sys/mips/include/_endian.h >> -- >> #define __bswap16(x) (__uint16_t)(__is_constant(x) ? \ >> __bswap16_const((__uint16_t)x) : __bswap16_var((__uint16_t)x)) >> #define __bswap32(x) (__uint32_t)(__is_constant(x) ? \ >> __bswap32_const((__uint32_t)x) : __bswap32_var((__uint32_t)x)) >> #define __bswap64(x) (__uint64_t)(__is_constant(x) ? \ >> __bswap64_const((__uint64_t)x) : __bswap64_var((__uint64_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. But I've never seen a case where foo(x) needs to be (foo(x)) (where foo is not a macro). '()' has highest precedence for expressions (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