* Szabolcs Nagy [2015-09-20 18:44:35 +0200]: > * Rich Felker [2015-09-20 12:36:29 -0400]: > > On Sun, Sep 20, 2015 at 02:44:50PM +0200, Szabolcs Nagy wrote: > > > out of range tm fields should not be treated as ub > > > as noted in the thread > > > http://sourceware.org/ml/libc-alpha/2015-09/msg00546.html > > > > > > i have a patch but there might be simpler approaches > > > > Wouldn't it be less invasive to just make some small changes like > > putting a U on some of the constants so that the arithmetic happens as > > unsigned? > > > > that might be simpler (and probably generates better > code for div,mod by const) > > but for the nl_langinfo item computation the range > has to be limited properly (tm_wday and tm_mon are > affected). implemented this approach with wday%7U and using some 0U+