Share via


New Compiler Features

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/27/2008

The following Windows Embedded CE 6.0 compiler features have changed:

  • Many compiler options have been deprecated.
    The following table lists deprecated compiler options, and in most cases suggests an alternative. The deprecated compiler options will continue to work as expected in the current release, but may be removed in a future release.

    Deprecated option Use the following option instead For more information, see these options

    /Fr

    /FR

    /FR, /Fr (Create .sbr File)

    /GX

    /EH (Exception Handling Model)

    /GX (Enable Exception Handling)

    /GZ [x86 only]

    /RTC (Run-Time Error Checks) [x86 only]

    /GZ (Enable Stack Frame Run-Time Error Checking) [x86 only]

    /H

    None

    /H (Restrict Length of External Names)

    /Og

    /O1, /O2 (Minimize Size, Maximize Speed)

    /Og (Global Optimizations)

    /QIfist[x86 only]

    No alternative option is needed. The compiler has made significant improvements in float to int conversion speed. [x86 only]

    /QIfist (Suppress _ftol) [x86 only]

    /V

    None

    /V (Version Number)

    /Yd

    /Z7, /Zi, /ZI (Debug Information Format) [x86 only]

    /Yd (Place Debug Information in Object File)

    /Zg

    None

    /Zg (Generate Function Prototypes)

  • Several compiler options are now on by default.

    Option on by default Description

    /GS - Enable Security Checks

    This option behaves differently in Windows Embedded CE 6.0 than in Visual C++2005.

    Note that the /GS option for Windows Embedded CE compilation is different from its implementation in Visual Studio 2005. For more information, see /GS - Enable Security Checks.

    Although this action is not recommended, you can turn off /GS behavior with /GS-

    /Zc:wchar_t

    This is Standard C++ behavior; a wchar_t variable will default to the built in type instead of a short unsigned integer. This change will break binary compatibility when client code is linked with libraries that were compiled without /Zc:wchar_t (LNK2019).

    Although this action is not recommended, you can turn off /Zc behavior with /Zc:wchar_t-

    /Zc:forScope

    This is Standard C++ behavior; code that depends on the use of a variable declared in a for loop after the for loop scope has ended will now fail to compile.

    /GR (Enable Run-Time Type Information)

    Used if your code uses the dynamic_cast operator or typeid.

    Although this action is not recommended, you can turn off /GR behavior with /GR-

  • Several new compiler options have been added

    New option Description

    /FC (Full Path of Source Code File in Diagnostics)

    Displays full path of source code files in diagnostic messages.

    /fp:<except[-]|fast|precise|strict> (Choose Floating-Point Model)

    Specify one of the following:

    • fp:except[-] - consider floating-point exceptions when generating code
    • fp:fast - "fast" floating-point model; results are less predictable
    • fp:precise - "precise" floating-point model; results are predictable
    • fp:strict - "strict" floating-point model (implies /fp:except)

    /analyze

    Analyzes the code, and allows you to identify defects in C/C++ programs.

    See C/C++ Code Analysis.

  • Several compiler options have been substantially modified:

    Modified option Description of change

    /vd (Disable Construction Displacements)

    Now allows you to use dynamic_cast Operator on an object being constructed (/vd2)

    /Zg (Generate Function Prototypes)

    Now only valid on C source code files, and not on C++ source code files.

    /EH (Exception Handling Model) or /EHs

    Can no longer be used to catch an exception that is raised with something other than a throw; use /EHa.

  • Inline function heuristics have been updated; see documentation for Visual Studio 2005 inline, __inline, __forceinline and inline_depth functions for more information.

  • Many new intrinsic functions have been added, and many previously undocumented intrinsics are now documented. For more information, see product documentation of Visual Studio 2005.

  • By default, any call to new that fails will throw an exception.

  • The compiler now implements the Named Return Value Optimization, which is enabled when you compile with /O1, /O2 (Minimize Size, Maximize Speed), /Ox (Full Optimization), or /Oxs (Full Optimization with bias toward minimizing size).

See Also

Reference

Shared Build Options
/analyze - C/C++ Code Analysis

Concepts

Unique Build Options