Hi,

On Tue, Aug 10, 2010 at 5:00 AM, Bruce Evans <b...@optusnet.com.au> 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  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
>

Ok, thanks to everybody for their input. I'll make the suggested
changes to sys/mips/include/_endian.h instead.

best
Neel
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to