The following compiler features are new for Visual C++ 6.0.
The __assume keyword is a hint to the optimizer that says that the expression passed as the argument is true until the expression is killed. This keyword can be used in conjunction with assert() during debug builds to ensure that the expression used with __assume is always true. Specifying __assume for an expression enables the compiler to perform additional optimizations, the safety of which could not be determined without this hint from the programmer. For more information, see __assume in the Visual C++ Programmer's Guide.
For better inline control, there are three new keywords: inline, __inline, and __forceinline. The inline and __inline keywords are hints to the compiler to try to inline the function; the optimizer decides whether inlining should be performed based upon optimization switches (optimizing for size vs. speed) and other heuristics. To provide better control over which functions are inlined, the __forceinline keyword is now supported. This keyword tells the compiler to go beyond the current inlining heuristics and to absolutely inline the function(s) to which it is applied, except in cases in which inlining would be impossible. For more information, see inline, __inline, __forceinline in the Visual C++ Programmer's Guide.
Dependencies Now Stored in a Text File
Exported makefiles now put the file dependencies in a separate, editable text file.
Dependency (.dep) File Generation
This feature provides more control over writing dependency information when you export a makefile. You can set options for this feature in the following places:
New compiler warnings have been added to help catch common programming errors.
Placement Form of Operator Delete
The compiler now supports the placement form of operator delete. Consequently, an exception, thrown during the initialization of an object, calls the proper delete function when the placement new is used.
For more information, see delete Operator or new Operator in the Visual C++ Programmer's Guide, or operator new Function in the C++ Language Reference.
You can use #pragma warning (push, n) and #pragma warning (pop) to push the current warning state (enabled or disabled) onto a stack and pop it off again. n represents a warning level whose state is to be pushed. You can use this feature when writing headers to ensure that a programmer does not compile the header with a warning level higher than you intend.
The Visual C++ compiler can embed certain run-time checks in code to detect common errors. The /GZ compiler option enables these checks. Run-time checks can only be used in debug (/Od) builds. There are new checks for auto-initialization of local variables, function pointer call stack validation, and call stack validation.
Compile-time throughput in projects with large precompiled header files (.pch) is faster. Compiler throughput on debug projects is as much as 30% faster, and on non-debug projects, as much as 15% faster.