You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Hudson <gh...@MIT.EDU> on 2005/10/15 22:10:30 UTC

Re: svn commit: r16738 - trunk/subversion/libsvn_wc

On Sat, 2005-10-15 at 14:42 -0500, philip@tigris.org wrote:
> +  if (modify_flags & SVN_WC__ENTRY_MODIFY_SCHEDULE
> +      && entry->schedule == svn_wc_schedule_delete)

It's wise to always use parentheses when mixing bitwise operators with
other kinds of operators, because bitwise operators have an
anti-intuitive precedence level for historical reasons.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r16738 - trunk/subversion/libsvn_wc

Posted by Philip Martin <ph...@codematters.co.uk>.
Greg Hudson <gh...@MIT.EDU> writes:

> On Sat, 2005-10-15 at 14:42 -0500, philip@tigris.org wrote:
>> +  if (modify_flags & SVN_WC__ENTRY_MODIFY_SCHEDULE
>> +      && entry->schedule == svn_wc_schedule_delete)
>
> It's wise to always use parentheses when mixing bitwise operators with
> other kinds of operators, because bitwise operators have an
> anti-intuitive precedence level for historical reasons.

Hmm, possibly.  On the other hand I find it natural to write an
expression like that without extra parentheses, so adding them would
make it marginally less readable.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org