[PATCH 8/9] mktime: avoid signed integer overflow

Roland McGrath roland@hack.frob.com
Wed May 23 22:15:00 GMT 2012


> 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



More information about the Libc-alpha mailing list