Microsoft KB Archive/168934

= BUG: You may receive multiple errors when you compile the Standard C++ Library headers with the /Za switch in Visual C++ =

Article ID: 168934

Article Last Modified on 9/2/2005

-

APPLIES TO

 The Standard C++ Library, when used with:  Microsoft Visual C++ 5.0 Enterprise Edition

 Microsoft Visual C++ 6.0 Enterprise Edition

 Microsoft Visual C++ 5.0 Professional Edition

 Microsoft Visual C++ 6.0 Professional Edition</li></ul>

 Microsoft Visual C++ 6.0 Standard Edition</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q168934

<div class="symptoms_section">

SYMPTOMS
If you use the /Za switch (Disable Language Extensions) when compiling the Standard C++ Library headers, it causes multiple compiler errors. For example: <pre class="fixed_text">  cl /Za /c /GX /Tp"iosfwd" Causes the following compiler errors:

iosfwd(132) : error C2906: C++ language change: to explicitly specialize class template 'char_traits' use the following syntax - template<> struct char_traits ...

iosfwd(171) : error C2906: C++ language change: to explicitly specialize class template 'char_traits' use the following syntax - template<> struct char_traits ...

Examples of other header files known to cause multiple compiler errors like C2838, C2146, and C2501 are:, , , , and.

<div class="resolution_section">

RESOLUTION
Do not use the compiler option /Za (Disable Language Extensions) when compiling the Standard C++ Library headers.

<div class="status_section">

STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

This problem was corrected in Microsoft Visual C++ .NET.

Keywords: kberrmsg kbtshoot kbbug kbfix kbnoupdate kblangcpp kbcpponly kbcompiler KB168934

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.