From: Ed Brey (brey_at_[hidden])
Date: 1999-10-27 17:32:19
Gaddy Barchana-Lorand wrote:
> I have downloaded the smart_ptr.hpp header file, and when compiling my code
> (with MSVC 6.0) I get the the C4503 warning (decorated name length exceeded,
> 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
> 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 http://www.egroups.com/list/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk