Microsoft KB Archive/149615

= PRB: C1004 or C1060 Error Generated by Inline _asm Call =

Article ID: 149615

Article Last Modified on 7/5/2005

-

APPLIES TO


 * Microsoft Visual C++ 5.0 Enterprise Edition
 * Microsoft Visual C++ 6.0 Enterprise Edition
 * Microsoft Visual C++ 2.0 Professional Edition
 * Microsoft Visual C++ 2.1
 * Microsoft Visual C++ 6.01 Professional Edition
 * Microsoft Visual C++ 4.0 Professional Edition
 * Microsoft Visual C++ 4.1 Subscription
 * Microsoft Visual C++ 5.0 Professional Edition
 * Microsoft Visual C++ 6.0 Professional Edition
 * Microsoft Visual C++ 5.0 Learning Edition
 * Microsoft Visual C++ 6.0 Standard Edition

-



This article was previously published under Q149615



SYMPTOMS
A C1004 (Unexpected End of File) or C1060 (Compiler is out of heap space) error may occur when comments are misused within inline assembly code.



STATUS
This behavior is by design.



MORE INFORMATION
Semicolons are used in assembly code to begin source comments. They behave exactly the same way as using the C++ comment specifier (//). All text following a semicolon is considered to be a comment. Comments terminate at the end of the current line.

Sample Code
void main(void) {  _asm { int 3; }    // The closing curly brace is ignored because it's                      // part of the assembly comment line

_asm {            // This code works because no valid code follows int 3;         // the semicolon comment specifier }

_asm { int 3 }    // This also works and is valid code }

Additional query words: 9.00 9.10 9.20 10.00 10.10

Keywords: kbtshoot kbprb kbcompiler KB149615

-

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

© Microsoft Corporation. All rights reserved.