TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Michael Stapleton
from: Paul Edwards
date: 1996-07-02 21:34:04
subject: Re: indirection

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)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.