Microsoft KB Archive/917331

= FIX: When you use the &quot;CL /E&quot; compiler option to preprocess a C source file, the macro in the output file does not contain any spaces in Visual C++ .NET 2003 =

Article ID: 917331

Article Last Modified on 11/16/2006

-

APPLIES TO


 * Microsoft Visual Studio .NET 2003 Professional Edition
 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft Visual Studio .NET 2003 Enterprise Developer
 * Microsoft Visual Studio .NET 2003 Academic Edition
 * Microsoft Visual C++ .NET 2003 Standard Edition

-



SYMPTOMS
Consider the following scenario:  You have a C source file that contains a macro. The macro contains one or more spaces. In Microsoft Visual C++ .NET 2003, you use the following command to preprocess the C source file:

CL /E 

Note The placeholder  represents the file name of the C source file that you want to preprocess.

In this scenario, the macro in the output file does not contain any spaces. For example, the C source file contains the following macro: However, the output file contains the following macro instead:
 * 1) line no
 * 1) lineno



Service pack information
To resolve this problem, obtain the latest service pack for Microsoft Visual Studio .NET 2003. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

918007 List of bugs that are fixed in Visual Studio .NET 2003 Service Pack 1

Hotfix information
A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites
You must have Microsoft Visual Studio .NET 2003 installed to apply this hotfix.

Restart requirement
You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information
This hotfix does not replace any other hotfixes.

File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section. This problem was first corrected in Visual Studio .NET 2003 Service Pack 1.



The CL /E compiler option
This option preprocesses C and C++ source files and then copies the preprocessed files to the standard output device. The output file is identical to the original source file, except that all preprocessor directives and macro expansions have been performed, and comments have been removed. You can use the /C option together with the /E option to preserve comments in the output file.

Use the /E option when you want to resubmit the preprocessed listing for compilation. Unlike the /EP option, the /E option adds #line directives to the output. The #line directives are put at the beginning and at the end of each included file. The #line directives are also put around lines that are removed by preprocessor directives that specify conditional compilation.

The #line directives renumber the lines of the output file. Errors that are generated during later stages of processing refer to the line numbers of the original source file instead of to the line numbers of the output file. Use the /EP option to suppress #line directives.

The /E option suppresses compilation. This option also suppresses the output files from the following options:
 * /FA
 * /Fa
 * /Fm

Note You cannot use precompiled headers together with the /E option.

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Keywords: kbvsnet2003sp1fix kbhotfixserver kbqfe kbpubtypekc KB917331

-

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

© Microsoft Corporation. All rights reserved.