[tz] [C/C++ PATCH] Implement -Wshift-negative-value (PR c/65179)
Steve Ellcey
sellcey at imgtec.com
Mon May 11 22:18:35 UTC 2015
On Fri, 2015-05-08 at 14:54 -0700, Paul Eggert wrote:
> On 05/08/2015 09:59 AM, Joseph Myers wrote:
> > Paul, although glibc's copy of parts of tzcode is a bit out of date, it
> > looks like the currenthttps://github.com/eggert/tz.git still has the
> > problematic code in private.h, relying on left-shifting -1 which has
> > undefined behavior in C99/C11 (implementation-defined in C90, as per
> > DR#081).
> Thanks for reporting that. I installed the attached patch into the
> experimental tz version on github <https://github.com/eggert/tz>, with
> the intent that this fix propagate into the next tz release and thus
> into glibc etc.
FYI: I put this into my glibc sources (the private.h, zdump.c, and zic.c
parts, glibc doesn't have localtime.c in the timezone directory and the
one in the time directory doesn't look like it matches what was
patched). And my GCC/glibc toolchain now builds. I didn't run the
glibc testsuite but I ran the GCC testsuite using this patch and
everything looked fine.
Steve Ellcey
sellcey at imgtec.com
More information about the tz
mailing list