Export (0) Print
Expand All

Breaking Changes (CRT) 

Breaking changes in the CRT.

Breaking changes

  • Many functions have been deprecated. See Deprecated CRT Functions.

  • Many functions now validate their parameters, halting execution if given invalid parameters. This may break code that passes invalid parameters and relies on the function ignoring them or just returning an error code. See Parameter Validation.

  • The file descriptor value -2 is now used to indicate that stdout and stderr are not available for output, as for example in a Windows application that has no console window. The previous value used was -1. For more information, see _fileno.

  • The single-threaded CRT libraries, libc.lib and libcd.lib, have been removed. Use the multi-threaded CRT libraries. The /ML compiler flag is no longer supported. Non-locking versions of some functions have been added in cases where the performance difference between the multithreaded code and the single-threaded code is potentially significant.

  • The overload of pow, double pow(int, int), was removed to better conform with the standard.

  • The %n format specifier is no longer supported by default in any of the printf family of functions because it is inherently insecure. The default behavior if %n is encountered is to invoke the invalid parameter handler. To enable %n support, use _set_printf_count_output (also see _get_printf_count_output).

  • sprintf now prints the negative sign of a signed zero.

  • swprintf has been changed to conform with the Standard; it now requires a size parameter. The form of swprintf without a size parameter has been deprecated.

  • _set_security_error_handler has been removed. Remove any calls to that function; the default handler is a much safer way of dealing with security errors.

  • time_t is now a 64-bit value (unless _USE_32BIT_TIME_T is defined).

  • The _spawn, _wspawn Functions now leave errno untouched on success, as specified by the C Standard.

  • RTC now uses wide characters by default.

  • Floating-point control word support functions have been deprecated for applications compiled with /CLR or /CLR:PURE. The affected functions are _clear87, _clearfp, _control87, _controlfp, _fpreset, _status87, _statusfp. You can disable the deprecation warning by defining _CRT_MANAGED_FP_NO_DEPRECATE, but the use of these functions in managed code is unpredictable and unsupported.

  • Some functions now return const pointers. The old, non-const behavior can be reinstated by defining _CONST_RETURN. The affected functions are

  • When linking with Setargv.obj or Wsetargv.obj, it is no longer possible to suppress the expansion of a wildcard character on the command line by enclosing it in double quotes. For more information, see Expanding Wildcard Arguments.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft