Re: Implementation-defined behaviour



CBFalconer wrote:

pete wrote:
Ioannis Vranos wrote:

... snip ...

K&R2 mentions the following:

"printf("%d %d\n", ++n, power(2,n)); /* WRONG */

can produce different results with different compilers, depending
on whether n is incremented before power is called".

That's why I call it implementation-defined behaviour.

It's unspecified behavior. The power(2,n) function call,
introduces a sequence point that the other code examples don't
have. This is all about sequence points.

Not quite. Also order of parameter evaluation.

By "this" I was refering to OP's confusion
about what was undefined
versus implementation defined and unspecified behavior.

--
pete
.



Relevant Pages

  • Re: Implementation-defined behaviour
    ... Dann Corbit wrote: ... There's no sequence points in there. ...
    (comp.lang.c)
  • Re: Heres one problem
    ... On Sep 28, 9:19 pm, "Pete Dashwood" ... exact sequence of what they did is usually not productive. ... credibility - and we KNOW you are both competent programmers. ... I haven't yet downloaded your COBOL program to take a look, ...
    (comp.lang.cobol)
  • Re: Heres one problem
    ... On Sep 28, 9:19 pm, "Pete Dashwood" ... exact sequence of what they did is usually not productive. ... I don't even like writing it, but some others must have had the same thought; rushing the publication of a project that didn't totally work, smoothly, given the environment options, it brings into question your credibility - and we KNOW you are both competent programmers. ... So given your format, what percentage of COBOL programmers do you think actually give a picture of data items, WITHOUT a final period/full Stop? ...
    (comp.lang.cobol)
  • Re: My name being used.
    ... Hash: SHA256 ... automatically hides it while interpreting the sequence. ... extracting key information like passwords. ... Pete, here's a tip mate, make sure you include your PGP key on all the ...
    (uk.legal)
  • Re: Deleting Duplicates, All records unique
    ... back hours of my life! ... Pete Wrote: ... Click OK - this will fill a sequence down this column to enable ... > Re-sort the remaining data using column E for sort order. ...
    (microsoft.public.excel.misc)