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"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 16 Nov 2003 07:00:57 -0600 To: Bruce Evans <bde@zeta.org.au>, Terry Lambert <tlambert2@mindspring.com>, freebsd-arch@FreeBSD.org
On Sun, Nov 16, 2003 at 06:52:30AM -0600, Jacques A. Vidrine wrote:
> On Sun, Nov 16, 2003 at 11:36:41PM +1100, Bruce Evans wrote:
> > Actually, it's implementation-defined if time_t is integral (doesn't
> > matter if it is signed or unsigned) (and the value is not representable).
> > It's only undefined if time_t is a floating type.
>
> Are you certain? I'll have to double-check. I thought that if a type
> was signed, then attempting to assign an out-of-range value was
> undefined (similar to overflow with signed types).
I should know better than to question whether you are certain :-)
I think I have failed to differentiate between `implementation-defined'
and `undefined'.
I'd like to avoid both `implementation-defined' and `undefined'
behavior.
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"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: Incrementing variables past limits
... > Does the ANSI standard say anything about incrementing variables past ...
For unsigned types, overflow has well-defined behavior; ... For signed types, overflow
causes undefined behavior. ... (comp.lang.c) - Re: C return a++ - is it safe?
... int, unsigned, float, double etc in financial calculis etc etc ... No.
Signed types can overflow. ... (comp.lang.c) - Re: questions of unsigned int, function prototypes
... >For a unsigned int used as a counter, ... Unlike signed types, the
C Standard fully specifies what ... happens to overflow for unsigned integers. ...
>What're purposes about using function prototypes in C? ... (alt.comp.lang.learn.c-cpp) - Re: Detecting overflows while computing off_t
... A sometimes useful fact, if you know that overflow behaves as addition ...
For signed types, it is still true for most implementations. ... (comp.lang.c)