Groups | Blog | Home
all groups > visual c > february 2006 >

visual c : Truncated Name warning (C4503) in a file specified in the VC 8 directory!



csharpdevp NO[at]SPAM yahoo.ca
2/28/2006 7:56:38 AM
I tried building a c++ project in VS 2005, and about 300 warnings, all
of the following nature:

warning C4503: 'std::_Tree<_Traits>::_Min' : decorated name length
exceeded, name was truncated

File: C:\Program Files\Microsoft Visual Studio 8\VC\include\vector
Line: 47

I haven't studied this file still. Although, since it's packaged with
VS 2005, I don't see why there should be a problem. Any suggestions?

You can find the standard vector header file in a location similar to
the above path on your machine.

Thank you
Carl Daniel [VC++ MVP]
2/28/2006 10:23:14 AM
[quoted text, click to view]

Actually, in VC7 and later, the limit was increased to 4096 characters, but
it's still pretty easy to exceed it with nested template instantiations.

-cd

Bruno van Dooren
2/28/2006 6:22:23 PM
[quoted text, click to view]

Hi,
You can safely disable this warning by specifying #pragma
warning(disable:4503); before your include files StdAfx.h is a good place
for this.

this warning occurrs when the decorated name of a symbol is larger than 255
bytes. the debugger will truncate this to 255 byte for display. There is
nothing you can do about it.
This frequently happens with template libraries because they have large
mangled names.

These warnings are harmless.

--

Kind regards,
Bruno.
bruno_nos_pam_van_dooren@hotmail.com
Remove only "_nos_pam"

csharpdevp NO[at]SPAM yahoo.ca
2/28/2006 11:45:38 PM
Thank you for the help. Could this however be responsible for any
linker errors?
Carl Daniel [VC++ MVP]
3/1/2006 7:24:25 AM
[quoted text, click to view]

In general, no.

If you're mixing modules compiled with VC6 (or earlier) with modules
compiled with VC7 (or later) then this could lead to linker errors since
names would have been truncated at different lengths by the older and newer
compilers.

-cd

AddThis Social Bookmark Button