Microsoft KB Archive/813540

= The /J compiler switch is incompatible with ATL and MFC applications =

Article ID: 813540

Article Last Modified on 11/14/2007

-

APPLIES TO


 * Microsoft Visual C++ 2005 Express Edition
 * Microsoft Visual C++ .NET 2003 Standard Edition
 * Microsoft Visual C++ .NET 2002 Standard Edition

-





SUMMARY
By default, the Microsoft C compiler or the Microsoft C++ compiler (cl.exe) sets the char type to a signed char data type. You can use the /J compiler switch that sets the char type to unsigned char. However, the /J compiler switch is incompatible with Active Template Library (ATL) applications and Microsoft Foundation Class (MFC) applications. If the /J command line switch is added while compiling MFC or ATL applications, you may not see any compiler error or warning. However, unintended side effects, such as data loss, may occur at runtime.



MORE INFORMATION
This switch was not designed to be used with ATL and MFC applications. MFC and ATL libraries are built and tested with a char type that is defined as a signed int data type.

