__TIME_MIN/__TIME_MAX
    Jacques A. Vidrine 
    nectar at FreeBSD.org
       
    Sun Nov 16 03:12:14 PST 2003
    
    
  
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 at celabo.org jvidrine at verio.net nectar at freebsd.org nectar at kth.se
    
    
More information about the freebsd-arch
mailing list