This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 6/9] mktime: do not assume signed right shift propagates signbit


> +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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]