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 8/9] mktime: avoid signed integer overflow


> By the way, the & versus && business was to save about a few bytes'
> worth of code on x86 (GCC 4.7.0 -O2) but it's not worth the
> hassle of commenting this so I changed it to && as you suggested.

You could also report a GCC bug for the missed optimization.  When both
sides are the result of a comparison and thus known to be exactly 0 or 1,
it could reduce the boolean to the bitwise (for && or ||).


Thanks,
Roland


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