Re: casting
- From: Keith Thompson <kst-u@xxxxxxx>
- Date: Fri, 09 Jun 2006 17:41:53 GMT
CBFalconer <cbfalconer@xxxxxxxxx> writes:
[...]
Trying to stuff a value into a signed object that cannot hold that
value results in implementation defined behaviour. You could have
just set off that 3 tons of fertilizer they found in Canada. Only
stuffing into unsigned objects has a defined action.
On a conversion to a signed integer type, if the value cannot be
represented, "either the result is implementation-defined or an
implementation-defined signal is raised". There is no undefined
behavior.
--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
.
- Follow-Ups:
- Re: casting
- From: Richard Bos
- Re: casting
- From: CBFalconer
- Re: casting
- References:
- casting
- From: Christian Christmann
- Re: casting
- From: CBFalconer
- casting
- Prev by Date: Re: How Do I License & Protect My Software?
- Next by Date: Re: need some help
- Previous by thread: Re: casting
- Next by thread: Re: casting
- Index(es):
Relevant Pages
|