BUG: C4786 or C1067 Caused by Long Identifier and /ZiLast reviewed: July 24, 1997Article ID: Q122539 |
The information in this article applies to:
SYMPTOMSUsing Visual C++ version 4.x and later to compile a C++ program with the /Zi option generates the following warning:
warning C4786: 'identifier' : identifier was truncated to
'255' characters in the debug information
Or, using Visual C++ version 2.x to compile a C++ program with the /Zi
option generates the following error:
fatal error C1067: compiler limit : debug information
module size exceeded. Error executing cl.exe.
CAUSEThe warning and error are caused by symbols with decorated names that exceed 255 and 247 characters, respectively.
RESOLUTIONThe best solution is to shorten the length of the identifier or compile for Release mode. If the identifier is a function call, reducing the number of parameters will help reduce the length. To workaround the fatal error C1067, users of Visual C++ version 2.x can also generate debugging information with the /Z7 (C7 Compatible) switch instead of the /Zi (Program Database) switch. With Visual C++ versions 2.x and later, using /Z7 generates the C4786 warning as listed above. This warning can be ignored although the identifier may not be accessible or viewable in the debugger.
STATUSMicrosoft has confirmed this to be a bug in the products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONThe following sample code can be used to demonstrate the problem.
Sample Code
/* Compile options needed: /Zi
*/
#include <conio.h>
// The next three lines should be on one continous line
class CAboutClassaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
{
public:
// The next three lines should be on one continous line
CAboutClassaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb() {}
// The next three lines should be on one continous line
~CAboutClassaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb(){}
};
void main(void)
{
// The next three lines should be on one continous line
CAboutClassaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb test1;
getch();
}
|
Additional query words: 9.00 10.00 10.10 10.20 buglist2.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |