]> sourceware.org Git - glibc.git/commit
Use TIME_T_MAX and TIME_T_MIN in tst-mktime2.c
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 15 Jan 2016 00:35:24 +0000 (16:35 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 15 Jan 2016 00:35:40 +0000 (16:35 -0800)
commit82c9a4f85e8522bc9e578725075d5c0535940b32
treea62d943911c77cdf16ea58ce2edcbf56c0cbe1ed
parentd7890e6947114785755ae5b1cf5310491092ee0b
Use TIME_T_MAX and TIME_T_MIN in tst-mktime2.c

GCC 5.3 compiles

for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
    continue;

into an infinite loop with -Os.  We can copy TIME_T_MAX and TIME_T_MIN
from time/mktime.c.

[BZ #19466]
* time/tst-mktime2.c (time_t_max): Removed.
(time_t_min): Likewise.
(TYPE_SIGNED): New.
(TYPE_MINIMUM): Likewise.
(TYPE_MAXIMUM): Likewise.
(TIME_T_MIN): Likewise.
(TIME_T_MAX): Likewise.
(mktime_test): Replace time_t_max and time_t_min with TIME_T_MAX
and TIME_T_MIN.
(do_test): Likewise.
ChangeLog
time/tst-mktime2.c
This page took 0.043098 seconds and 5 git commands to generate.