PE> The mktime() example shows a comparison to -1 instead of
PE> (time_t)-1, which could cause problems on certain
PE> implementations (theoretical).
MS> I expect that it could, but I think you may need to explain the
MS> scenario to me. I suppose that if time_t was an extra wide integral
MS> type then there could be problems analogous to char c = getchar().
If time_t is an unsigned short, on a system where sizeof short < sizeof
int, then the time_t return of 0xffff will be converted to 0x0000ffff
(e.g.) and not compare equal to 0xffffffff which is what "-1" is.
BFN. Paul.
@EOT:
---
* Origin: X (3:711/934.9)
|