VS2012 C4503 warning (decorated name length exceeded, name was truncated) with boost 1.52
[Please do not mail me a copy of your followup] I'm using boost 1.52. If you see this thread on stack overflow: http://stackoverflow.com/questions/9669071/warning-c4503-when-using-pragma-w... You'll see a comment down at the bottom where someone has increased the warning level for their project and they are getting tons of these C4503 warnings when using boost includes. I have verified on my project that if I don't change the warning level and don't specifically disable this warning project-wide, then including using boost in my project does not generate the warning. However, if I increase the warning level beyond the default, to 3 in my case whereas the poster on stack overflow had used 4, then I get the warning. I, like the commenter on stack overflow, would like to know if there's a boost-friendly way to tell boost to disable the warning for boost headers where the boost authors have decided it's innocuous, while still retaining the high warning setting for my own code. Any suggestions? Thanks in advance. -- "The Direct3D Graphics Pipeline" free book http://tinyurl.com/d3d-pipeline The Computer Graphics Museum http://computergraphicsmuseum.org The Terminals Wiki http://terminals.classiccmp.org Legalize Adulthood! (my blog) http://legalizeadulthood.wordpress.com
-----Original Message----- From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Richard Sent: Tuesday, March 05, 2013 11:32 PM To: boost-users@lists.boost.org Subject: [Boost-users] VS2012 C4503 warning (decorated name length exceeded, name was truncated) with boost 1.52
[Please do not mail me a copy of your followup]
I'm using boost 1.52.
If you see this thread on stack overflow: <http://stackoverflow.com/questions/9669071/warning-c4503-when-using-pragma-w... boost-includes>
You'll see a comment down at the bottom where someone has increased the warning level for their project and they are getting tons of these C4503 warnings when using boost includes.
I have verified on my project that if I don't change the warning level and don't specifically disable this warning project-wide, then including using boost in my project does not generate the warning.
However, if I increase the warning level beyond the default, to 3 in my case whereas the poster on stack overflow had used 4, then I get the warning.
I, like the commenter on stack overflow, would like to know if there's a boost-friendly way to tell boost to disable the warning for boost headers where the boost authors have decided it's innocuous, while still retaining the high warning setting for my own code.
Any suggestions?
https://svn.boost.org/trac/boost/wiki/Guidelines/WarningsGuidelines contains the sum of accumulated wisdom on this annoying (and complicated) issue. The general idea is to bracket warning-disables around things that the Boost author has decided are unhelpful warnings - for each compiler. In theory, you should be able to use the same technique in your code, but in practice you may find it tricky/tiresome. If you think that the Boost author has not disabled and restored, or not restored the warning level after doing his bit, you could submit a ticket 'complaining' https://svn.boost.org/trac/boost/newticket But don't expect a quick response on what many regard as a trivial issue - though when you get hit with a blizzard of warnings, it may seem less than trivial to you ;-) Good luck! Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com
[Please do not mail me a copy of your followup] I wrote:
Any suggestions?
Paul Bristow spake the secret code <006a01ce1a55$60541ab0$20fc5010$@hetp.u-net.com> thusly:
https://svn.boost.org/trac/boost/wiki/Guidelines/WarningsGuidelines
Thanks, this is a good starting point.
The general idea is to bracket warning-disables around things that the Boost author has decided are unhelpful warnings - for each compiler.
That's what I was expecting to happen.
If you think that the Boost author has not disabled and restored, or not restored the warning level after doing his bit, you could submit a ticket 'complaining'
https://svn.boost.org/trac/boost/newticket
But don't expect a quick response on what many regard as a trivial issue - though when you get hit with a blizzard of warnings, it may seem less than trivial to you ;-)
The documentation says that this warning should be issued at the default warning level (/W1) and higher. The odd thing is that if we compile with the default warning level, we don't see this warning. If we compile at a higher warning level, such as /W3, then we see the warning. My expectation is that boost was suppressing this warning (hence, why we didn't see it at /W1) and I was thinking that our /W3 must somehow be overriding the boost suppression. I guess I will have to dig further into the resource you supplied and see what I can find out. I'd come across Geoff Chappell's site before and thought it useful, so thanks for reminding me of it again via the boost page you cited. -- "The Direct3D Graphics Pipeline" free book http://tinyurl.com/d3d-pipeline The Computer Graphics Museum http://computergraphicsmuseum.org The Terminals Wiki http://terminals.classiccmp.org Legalize Adulthood! (my blog) http://legalizeadulthood.wordpress.com
participants (2)
-
legalize+jeeves@mail.xmission.com
-
Paul A. Bristow