Article ID: 119873 - Last Review: July 5, 2005 - Revision: 1.1 FIX: Incorrect Use of #pragma Pack Causes C1001 ErrorsThis article was previously published under Q119873 On This PageSYMPTOMS
When compiling code that uses #pragma pack() to pop an ID that has not been
pushed after successfully popping an ID that was pushed, the compilers
listed above will generate:
fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 902) NOTE: In Microsoft Visual Studio .NET, you receive a C4160 warning instead of the error message, so you can compile and run the program.
Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information RESOLUTION
Pop only IDs that have been previously pushed onto the compiler's internal
stack.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This problem was corrected in Microsoft Visual C++ .NET. MORE INFORMATION
The following sample code demonstrates the bug:
Sample CodeAPPLIES TO
| Article Translations
|

Back to the top
