
I've written some code using the Lambda & Lambda.bind libraries, although I don't think that really matters, which produce a page ful of C4503 warnings, *4503 'identifier' : decorated name length exceeded, name was truncated* In my code I've tried using pragma disable around the lines which I altered to cause the warnings, but it makes no difference. Is it necessary to apply these pragmas within the Boost library code, or is there a better way? Thanks, Rob.

On Wed, Jan 14, 2009 at 10:28 AM, Robert Jones
I've written some code using the Lambda & Lambda.bind libraries, although I don't think that really matters, which produce a page ful of C4503 warnings,
4503 'identifier' : decorated name length exceeded, name was truncated
In my code I've tried using pragma disable around the lines which I altered to cause the warnings, but it makes no difference. Is it necessary to apply these pragmas within the Boost library code, or is there a better way?
Thanks, Rob.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
What MSVC version are you using? Regards, Pete

On Wed, Jan 14, 2009 at 10:39 AM, Peter Barker
On Wed, Jan 14, 2009 at 10:28 AM, Robert Jones
wrote: I've written some code using the Lambda & Lambda.bind libraries, although I don't think that really matters, which produce a page ful of C4503 warnings,
4503 'identifier' : decorated name length exceeded, name was truncated
In my code I've tried using pragma disable around the lines which I altered to cause the warnings, but it makes no difference. Is it necessary to apply these pragmas within the Boost library code, or is there a better way?
Thanks, Rob.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
What MSVC version are you using?
Microsoft Visual Studio 2005 Pro Microsoft Visual C++ 2005 Thanks, Rob.

One solution would be to disable that warning project-wide, under Project Properties, C/C++, Advanced, Disable Specific Warnings. Robert Jones wrote:
On Wed, Jan 14, 2009 at 10:39 AM, Peter Barker
mailto:newbarker@gmail.com> wrote: On Wed, Jan 14, 2009 at 10:28 AM, Robert Jones
mailto:robertgbjones@gmail.com> wrote: > I've written some code using the Lambda & Lambda.bind libraries, > although I don't think that really matters, which produce a page ful > of C4503 warnings, > > 4503 'identifier' : decorated name length exceeded, name was truncated > > In my code I've tried using pragma disable around the lines which I altered > to cause the warnings, but it makes no difference. Is it necessary to apply > these pragmas within the Boost library code, or is there a better way? > > Thanks, Rob. > > > _______________________________________________ > Boost-users mailing list > Boost-users@lists.boost.org mailto:Boost-users@lists.boost.org > http://lists.boost.org/mailman/listinfo.cgi/boost-users > What MSVC version are you using?
Microsoft Visual Studio 2005 Pro Microsoft Visual C++ 2005
Thanks, Rob.
------------------------------------------------------------------------
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

On Wed, Jan 14, 2009 at 10:50 AM, Robert Jones
On Wed, Jan 14, 2009 at 10:39 AM, Peter Barker
wrote: On Wed, Jan 14, 2009 at 10:28 AM, Robert Jones
wrote: I've written some code using the Lambda & Lambda.bind libraries, although I don't think that really matters, which produce a page ful of C4503 warnings,
4503 'identifier' : decorated name length exceeded, name was truncated
In my code I've tried using pragma disable around the lines which I altered to cause the warnings, but it makes no difference. Is it necessary to apply these pragmas within the Boost library code, or is there a better way?
Thanks, Rob.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
What MSVC version are you using?
Microsoft Visual Studio 2005 Pro Microsoft Visual C++ 2005
Thanks, Rob.
Rob, You could disable the warning for the entire project by going into Project|Properties, C/C++, Advanced and enter it in the "Disable Specific Warnings" box. I'm using MSVC7 (2003) and had to do that for C4675 (ADL lookup warning). Bear in mind I don't know the nature of the warning though. Anyone else seen his warning? Regards, Pete

On Wed, Jan 14, 2009 at 1:34 PM, Peter Barker
On Wed, Jan 14, 2009 at 10:50 AM, Robert Jones
wrote: On Wed, Jan 14, 2009 at 10:39 AM, Peter Barker
wrote: On Wed, Jan 14, 2009 at 10:28 AM, Robert Jones
wrote:
I've written some code using the Lambda & Lambda.bind libraries, although I don't think that really matters, which produce a page ful of C4503 warnings,
4503 'identifier' : decorated name length exceeded, name was truncated
In my code I've tried using pragma disable around the lines which I altered to cause the warnings, but it makes no difference. Is it necessary to apply these pragmas within the Boost library code, or is there a better way?
Thanks, Rob.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
What MSVC version are you using?
Microsoft Visual Studio 2005 Pro Microsoft Visual C++ 2005
Thanks, Rob.
Rob,
You could disable the warning for the entire project by going into Project|Properties, C/C++, Advanced and enter it in the "Disable Specific Warnings" box. I'm using MSVC7 (2003) and had to do that for C4675 (ADL lookup warning).
Bear in mind I don't know the nature of the warning though. Anyone else seen his warning?
Yes, that was the conclusion I came to, and in fact I can use the properties on a per file basis to do this. Strangley it also works if I put #pragma warning( disale : 4503 ) at the top of the .cpp file causing problems, but does not work if I put #pragma warning( push ) #pragma warning( disable : 4503 ) ...my whole .cpp file #pragma warning( pop ) and does not work if I put the same #pragmas around the #include of all my boost headers. It's all a bit bizarre. The warning itself is not a worry - it's just telling me that a name generated through multiple template instantiations is longer than 4096 characters. According to the MS docs this does invalidate the program or generated code, but can be an issue for debugging and symbol tracking. Thanks, Rob.

Robert Jones wrote: [snip]
Yes, that was the conclusion I came to, and in fact I can use the properties on a per file basis to do this. Strangley it also works if I put #pragma warning( disale : 4503 ) at the top of the .cpp file causing problems, but does not work if I put
#pragma warning( push ) #pragma warning( disable : 4503 ) ...my whole .cpp file #pragma warning( pop )
[snip]
Thanks, Rob.
Just out of curiosity, why do you put #pragma warning( push/pop ) around your .cpp file's content? Do some other files #include your .cpp? Thanks, Gevorg

On Wed, Jan 14, 2009 at 3:54 PM, Gevorg Voskanyan
Robert Jones wrote:
[snip]
Yes, that was the conclusion I came to, and in fact I can use the properties on a per file basis to do this. Strangley it also works if I put #pragma warning( disale : 4503 ) at the top of the .cpp file causing problems, but does not work if I put
#pragma warning( push ) #pragma warning( disable : 4503 ) ...my whole .cpp file #pragma warning( pop )
[snip]
Thanks, Rob.
Just out of curiosity, why do you put #pragma warning( push/pop ) around your .cpp file's content? Do some other files #include your .cpp?
Good point, to which the answers are (a) Stupidity & (b) No, which means you have almost solved my problem! It would still seem reasonable to put push/pop around a single function tho', which also fails to silence the warning. Thanks very much. Rob.

Robert Jones wrote:
Gevorg Voskanyan wrote:
Just out of curiosity, why do you put #pragma warning( push/pop ) around your .cpp file's content? Do some other files #include your .cpp?
Good point, to which the answers are (a) Stupidity & (b) No, which means you have almost solved my problem!
It would still seem reasonable to put push/pop around a single function tho', which also fails to silence the warning.
Thanks very much.
Rob.
Glad it helped :) Trying to silence the warning locally for a function where boost.lambda is used does not work because apparently it is required the warning to be disabled both at the point of instantiation (in your function) AND at template definition (in boost.lambda headers) for msvc not to issue the warning. That is easily achieved if you disable the warning at the beginning of the .cpp file and leave it disabled throughout it. <caveat> This explanation of msvc behavior is based on my guess only, haven't tried that. </caveat> Best Regards, Gevorg
participants (4)
-
Gevorg Voskanyan
-
Matthew Bray
-
Peter Barker
-
Robert Jones