Preprocessor Features in Visual C++ 2005

This topic lists the new features in the Visual C++ 2005 preprocessor.

For more information, see Breaking Changes in the Visual C++ 2005 Compiler.

Remarks

The Visual C++ 2005 preprocessor contains the following new features:

  • __CLR_VER predefined macro added. For more information, see Predefined Macros.

  • The comment (C/C+) pragma now accepts /MANIFESTDEPENDENCY as a linker comment. The exestr option to comment is now deprecated.

  • embedded_idl attribute (The #import Directive) now takes an optional parameter.

  • fenv_access pragma

  • float_control pragma

  • fp_contract pragma

  • Global variables will not be initialized in the order they are declared if you have global variables in pragma managed, unmanaged and unmanaged sections. This is a potential breaking change if, for example, an unmanaged global variable is initialized with a managed global variables, and a fully constructed managed object is required.

  • Sections specified with init_seg are now read only, and not read/write as in previous versions.

  • inline_depth default is now 16. A default of 16 was also in effect in Visual C++ .NET 2003.

  • _INTEGRAL_MAX_BITS predefined macro added, see Predefined Macros.

  • _M_CEE, _M_CEE_PURE, and _M_CEE_SAFE predefined macros added, see Predefined Macros.

  • _M_IX86_FP predefined macro added. For more information, see Predefined Macros.

  • _M_X64 predefined macro added. For more information, see Predefined Macros.

  • make_public pragma

  • managed, unmanaged pragma syntax updated (now has push and pop)

  • mscorlib.dll is now implicitly referenced by The #using Directive in all /clr compilations.

  • _OPENMP predefined macro added. For more information, see Predefined Macros.

  • optimize pragma has been updated, a and w are no longer valid parameters.

  • no_registry#import attribute has been added.

  • region, endregion pragmas added

  • _VC_NODEFAULTLIB predefined macro added. For more information, see Predefined Macros.

  • Variadic Macros are now implemented.

  • vtordisp is deprecated and will be removed in a future release of Visual C++.

  • The warning pragma now has the suppress specifier.

See Also

Concepts

Changes in Visual C++ 2005 Compiler, Language, and Tools