In this test, strptime() does not assign a value to tm1.tm_yday (it is not told to do so), so it stays uninitialized. As far as I know this is perfectly legal. The random value of tm_yday causes a CYG_PRECONDITION in strftime() fail. I think it would be better to move the precondition tests from the beginning of strftime() right before the code that does actually use the tested members of struct tm, so that strftime() will still work if no uninitialized parts of struct tm are used. -- %SYSTEM-F-ANARCHISM, The operating system has been overthrown