This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH 6/9] mktime: do not assume signed right shift propagates signbit
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 23 May 2012 11:15:54 -0700 (PDT)
- Subject: Re: [PATCH 6/9] mktime: do not assume signed right shift propagates signbit
- References: <4FBD18E1.email@example.com>
> +static int
> +isdst_differ (int a, int b)
> + return (!a != !b) & (0 <= a) & (0 <= b);
It's bizarre that this uses & instead of &&, though they are equivalent in
this case. Is it really an intended microoptimization for some compiler or
machine? If so, please add a comment about it. If not, just use &&.
Otherwise the change looks fine.