Boost logo

Boost :

From: Paul Tozour (paultoz_at_[hidden])
Date: 1999-10-27 17:37:01

Try this:

#pragma warning (disable:4786)

I recommend putting it immediately before any STL header #includes or before
#including anything else that could cause the warning.


-----Original Message-----
From: Ed Brey [mailto:brey_at_[hidden]]
Sent: Wednesday, October 27, 1999 3:32 PM
To: boost_at_[hidden]
Cc: Gaddy Barchana-Lorand
Subject: [boost] Re: Warning about a truncated decorated name with

Gaddy Barchana-Lorand wrote:
> I have downloaded the smart_ptr.hpp header file, and when compiling my
> (with MSVC 6.0) I get the the C4503 warning (decorated name length
> name was truncated).

I recently ran into this same problem, although with my own template,
rather than a boost one.

> 1. Is there a way to avoid the warning (as I'm using the smrt_ptr with STL
> the names get very long quite easily)?

Get a better compiler. Of course, if you're like me and that option
doesn't work, a viable plan B is to simply disable the warning with
#pragma disable.

> 2. Is it safe to ignore the warning (Don't think so...)?

AFAK, it is. The warning is telling you that the compiler is
truncating the mangled name at 255 characters, much like the way more
primitive compilers used to truncate variable names at 32 characters.
So, as long as your first 255 characters are unique, you're fine. I
haven't examined the mangled names in detail, but I expect that this
is the case, based on where I see early differences that I see in the
"human readable" names that the compiler spits on an error.

If the 255 character limit did cause a name clash, you should get a
diagnostic from the linker or compiler complaining that the name is
multiply defined, which makes me more comfortable with just turning
off the warning. Disclaimer: I haven't tested this theory. In any
case, I've been running with the warning turned off, and haven't had
any problems so far.

> If you answer - please reply to my email as well (as I didn't know how to
> subscribe to this mailing list).

From the egroups site:

To subscribe, send a message to boost-subscribe_at_[hidden] or go the
this e-group's home page at

Receive Red Hat Linux 6 Toolkit - a 3 book
+ 2-CDs for $9.99! A $109.97 value, yours
with membership in Library of Computer and
Information Sciences. Order at home: - Simplifying group communications

Boost list run by bdawes at, gregod at, cpdaniel at, john at