Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: c23 atoi

...

  • do not need to set errno on an error;
  • have have undefined behavior if the value of the result cannot be represented (before C23; in C23 and later, their behavior is defined by the strto*()  functions);
  • return 0 (or 0.0) if the string does not represent an integer (or decimal), which is indistinguishable from a correctly formatted, zero-denoting input string.

...