Re: casting



Keith Thompson wrote:
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.

Doesn't the phrase "implementation defined behaviour" mean just
that? To me, that includes signalling or peculiar result values.

--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html


.



Relevant Pages

  • Re: casting
    ... just set off that 3 tons of fertilizer they found in Canada. ... stuffing into unsigned objects has a defined action. ...
    (comp.lang.c)
  • Re: casting
    ... just set off that 3 tons of fertilizer they found in Canada. ... stuffing into unsigned objects has a defined action. ...
    (comp.lang.c)
  • Re: casting
    ... just set off that 3 tons of fertilizer they found in Canada. ... stuffing into unsigned objects has a defined action. ... Yes, it's implementation-defined behavior, *not* undefined behavior. ...
    (comp.lang.c)
  • Re: Time For Me To Enter The HD World?
    ... We get tons ... >> of HD hockey in Canada. ... > Lucky you. ...
    (alt.tv.tech.hdtv)
  • Re: SF In A Post-Oil Future
    ... oil deposits, and Canada has two in tar sands. ... There is no reason to encase yourself in three tons of metal ...
    (soc.retirement)