Re: __TIME_MIN/__TIME_MAX
From: Jacques A. Vidrine (nectar_at_FreeBSD.org)
Date: 11/16/03
- Previous message: Jacques A. Vidrine: "Re: __TIME_MIN/__TIME_MAX"
- In reply to: Jacques A. Vidrine: "Re: __TIME_MIN/__TIME_MAX"
- Next in thread: Bruce Evans: "Re: __TIME_MIN/__TIME_MAX"
- Reply: Bruce Evans: "Re: __TIME_MIN/__TIME_MAX"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 16 Nov 2003 05:12:12 -0600 To: Terry Lambert <tlambert2@mindspring.com>, freebsd-arch@freebsd.org
On Sun, Nov 16, 2003 at 04:20:10AM -0600, Jacques A. Vidrine wrote:
> /* How can this be implemented correctly? */
> int range_error(long n, time_t t)
> {
> return (long)(t = n) == n;
> }
Hrmp. Because time_t is probably signed, technically this can cause
`undefined behavior' if the range of `long' is more than the range of
`time_t' (e.g. on alpha). *sigh*
All I really want to do is correct a parsing bug and at the same time
eliminate a warning so that I can set WARNS?=1 in libc before the code
freeze.
Cheers,
-- Jacques Vidrine NTT/Verio SME FreeBSD UNIX Heimdal nectar@celabo.org jvidrine@verio.net nectar@freebsd.org nectar@kth.se _______________________________________________ freebsd-arch@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arch To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Jacques A. Vidrine: "Re: __TIME_MIN/__TIME_MAX"
- In reply to: Jacques A. Vidrine: "Re: __TIME_MIN/__TIME_MAX"
- Next in thread: Bruce Evans: "Re: __TIME_MIN/__TIME_MAX"
- Reply: Bruce Evans: "Re: __TIME_MIN/__TIME_MAX"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]