Re: Compiler Warning

[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]

Posted by William D McQuain on December 05, 2001 at 14:07:10:

In Reply to: Compiler Warning posted by Edmund A. Holohan III on December 04, 2001 at 20:01:19:

This is an annoyance and it is the fault of Microsoft's compiler people. There's an internal limit of 255 characters for identifiers. I've been told this stems back to Microsoft's assembler code.

With template code the compiler "mangles" a unique name for each template instantiation. You might expect that

queue X;

would result in a type name like "queuehoohah" but it doesn't; the actual mangled name is more complex than that.

It's common when using STL code to get this warning. As far as my experience goes, it's never led to any run-time errors. If it did, you'd be hosed since the problem is in MS code, not yours.

You CAN disable the warning message by adding a compiler directive to the appropriate files:


: I am receiving the following compiler warning. It appears to be some internal limitation that shouldn't affect my program:

: \microsoft visual studio\vc98\include\utility(21)
: warning C4786: [BIG SNIP} identifier was truncated to '255' characters in the debug information

: The "BIG SNIP" was a VERY long statement referring to a STL queue of string objects that I created...

: The big question: Should I just ignore this error, or have I secretly ruined something?

: - Ed

Follow Ups:

Post a Followup




Optional Link URL:
Link Title:
Optional Image URL:

[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]