This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

printf() on evaluation version STRANGE behaviour

what happens if you do this ...


printf("test %x"),variable;

<= unexpected behaviour ...

or please explain.

No warnings, no errors from compiler.

Is this only in the evaluation version?

Kind regards

Parents
  • what happens if you do this ...

    printf("test %x"),variable;

    Undefined behaviour combined with a no-op that makes it impossible to inspect the return value of that printf() --- but that's OK, because you don't even know if the printf() will ever return, so its return value wouldn't do you any good, anyway.

    <= unexpected behaviour ...

    I should hope so ;-). It's a serious error to expect any behaviour from the above, so yes, whatever behaviour you get should be unexpected.

Reply
  • what happens if you do this ...

    printf("test %x"),variable;

    Undefined behaviour combined with a no-op that makes it impossible to inspect the return value of that printf() --- but that's OK, because you don't even know if the printf() will ever return, so its return value wouldn't do you any good, anyway.

    <= unexpected behaviour ...

    I should hope so ;-). It's a serious error to expect any behaviour from the above, so yes, whatever behaviour you get should be unexpected.

Children
No data