New Compiler Features
This topic lists the new features in the Visual C++ 2005 compiler.
Note
The Visual C++ compiler can only be run on the following operating systems: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003.
Remarks
The Visual C++ 2005 compiler contains the following new features:
The compiler has breaking changes in this release. See Breaking Changes in the Visual C++ 2005 Compiler for more information.
64-bit native and cross-compilers. For more information, see Compiler Options and x64 Software Conventions.
/analyze (Enterprise Code Analysis) compiler option has been added.
/bigobj compiler option has been added.
/clr:pure, /clr:safe, and /clr:oldSyntax have been added. For more information, see /clr (Common Language Runtime Compilation).
Deprecated compiler options: many compiler options have been deprecated in this release; see Deprecated Compiler Options for more information.
Double thunking in /clr code is reduced; see Double Thunking (C++) for more information.
/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.
/errorReport (Report Internal Compiler Errors) compiler option has been added.
/favor (Optimize for 64) compiler option has been added.
/FA, /Fa (Listing File) compiler option has been added.
/FC (Full Path of Source Code File in Diagnostics) compiler option has been added.
/fp (Specify Floating-Point Behavior) compiler option has been added.
/G (Optimize for Processor) Options compiler option has been added.
/G (Optimize for Processor) Options compiler option has been added.
/G3, /G4, /G5, /G6, /G7, and /GB compiler options have been removed. The compiler now uses a "blended model" that attempts to create the best output file for all architectures.
/Gf has been removed. Use /GF (Eliminate Duplicate Strings) instead.
/GL (Whole Program Optimization) is now compatible with /CLRHEADER. For more information, see /LTCG (Link-time Code Generation).
/GR is now on by default. See /GR (Enable Run-Time Type Information) for more information.
/GS (Buffer Security Check) now provides security protection for vulnerable pointer parameters. /GS is now on by default. /GS now also works on functions compiled to MSIL with /clr (Common Language Runtime Compilation).
/homeparams (Copy Register Parameters to Stack) compiler option has been added.
/hotpatch (Create Hotpatchable Image) compiler option has been added.
Inline function heuristics have been updated; see inline, __inline, __forceinline and inline_depth for more information
Many new intrinsic functions have been added, and many previously undocumented intrinsics are now documented. For more information, see Alphabetical Listing of Intrinsic Functions.
By default, any call to new that fails will throw an exception. For more information, see The new and delete Operators.
/ML and /MLd compiler options have been removed. Visual C++ no longer supports single-threaded, statically linked CRT library support. See C Run-Time Libraries for more information.
The compiler implemented the Named Return Value Optimization, which is enabled when you compile with /O1, /O2 (Minimize Size, Maximize Speed), /Og (Global Optimizations), and /Ox (Full Optimization).
/Oa compiler option has been removed but will be silently ignored; use the noalias or restrict __declspec modifiers to specify how the compiler does aliasing.
/Op compiler option had been removed. Use /fp (Specify Floating-Point Behavior) instead.
OpenMP is now supported by Visual C++. For more information, see OpenMP in Visual C++.
/openmp (Enable OpenMP 2.0 Support) compiler option has been added.
/Ow compiler option has been removed but will be silently ignored. Use the noalias or restrict __declspec modifiers to specify how the compiler does aliasing.
/QI0f has been removed.
/QIfdiv has been removed.
/QIPF_B (Errata for B CPU Stepping) compiler option has been added.
/QIPF_C (Errata for C CPU Stepping) compiler option has been added.
/QIPF_fr32 (Do Not Use Upper 96 Floating Point Registers) compiler option has been added.
/QIPF_noPIC (Generate Position Dependent Code) compiler option has been added.
/QIPF_restrict_plabels (Assume No Functions Created at Run Time) compiler option has been added.
/vd (Disable Construction Displacements) now allows you to use dynamic_cast Operator on an object being constructed (/vd2)
/YX compiler option has been removed. Use /Yc (Create Precompiled Header File) or /Yu (Use Precompiled Header File) instead. If you remove /YX from your build configurations and replace it with nothing, it can result in faster builds.
/Zc:forScope is now on by default. See /Zc:forScope (Force Conformance in for Loop Scope) for more information.
/Zc:wchar_t is now on by default. See /Zc:wchar_t (wchar_t Is Native Type) for more information.
/Zd compiler option has been removed. Line-number only debugging information is no longer supported. Use /Zi instead (see /Z7, /Zi, /ZI (Debug Information Format) for more information).
/Zg is now only valid on C source code files, and not on C++ source code files. See /Zg (Generate Function Prototypes) for more information.
/Zx (Debug Optimized Itanium Code) compiler option has been added.