2

Is there any difference between Implementation dependant and undefined behaviour as for C/C++ standards?

Stefano Falasca
  • 8,337
  • 1
  • 14
  • 23
  • You can rely on getting the same implementation defined behaviour across multiple runs of your program on the same platform. You can't make any assumptions about undefined behaviour - two runs of the same program on the same platform could give different results. – simonc Jul 11 '13 at 09:23

1 Answers1

1

Implementation dependent means that a certain construct differs from platform to platform but in a defined, well-specified manner. (e.g. the va_arg family of macros in C varies between posix and windows)

Undefined behaviour means that anything (literally) could happen. i.e. totally unspecified. (e.g. the behaviour of i = ++i).

Bathsheba
  • 227,678
  • 33
  • 352
  • 470