|
Boost Users : |
Subject: Re: [Boost-users] VS2012 C4503 warning (decorated name length exceeded, name was truncated) with boost 1.52
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2013-03-06 05:28:39
> -----Original Message-----
> From: Boost-users [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Richard
> Sent: Tuesday, March 05, 2013 11:32 PM
> To: boost-users_at_[hidden]
> 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-warning-around-
> 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_at_[hidden]
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net