Strange localtime/gmtime behaviour
teich-p at Rcs1.urz.tu-dresden.de
Sun Apr 29 09:39:11 PDT 2001
Am Sonntag, 29. April 2001 11:59 schrieb Peter Naulls:
> (b) produced a minimal text case which exhibits the problem.
> I would think it very odd that a date handling problem alone could do
> more than simply crash the running program.
Here is the testcase:
---file timetest.cpp start
struct tm *tt;
printf("%d %08x\n", t, tt);
--file timetest.cpp end
just compile it without any additional switches and the actual gccsdk.
Transfer the program to your RiscOS machine (mine is a SA RiscPC with RO4)
Disable DST using !Alarm. The program runs as expected. Enable DST again. The
program stops before executing printf().
Replace localtime() with gmtime(). With DST disabled all is ok, but if you
now enable DST the computer freezes completely.
More information about the gcc