Boost logo

Boost :

From: Nick Ambrose (nick_at_[hidden])
Date: 1999-10-28 15:01:32


Ed Brey wrote:

> 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
> #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.
>

I think it is not the actual names that are truncated, just the names in the debug
info.
This means that you might have problems inspecting the symbols in the debugger,
but the full names should be used
in the actual generated code, so it should be safe to ignore without the danger of
duplicate names or the wrong symbol being picked up.

Disclaimer: I haven't actually verified this, but it's the understanding I came to
from the actual text of the message (it is quite specific that the name is being
truncated in the debug info)
Nick


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk