By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,134 Members | 1,874 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,134 IT Pros & Developers. It's quick & easy.

[maybe OT] warning : debug info truncated to 255 character...

P: n/a
Hi !
currently programming something that heavily use std::vector<std::string>
and std::map<std::string, std::string> . When compiling my program I have
like 1015 warnings : warning, debug info truncated to 255 character (because
of the decoration, template and namespace stuffs). It's getting annoying..
it's longer to output the warning than to compile itself and when I get an
error I must pipe stderr and make a search for error to find the error. Is
there any way I can avoid this ? I read the vc++ docs and theres no way to
disable the warning.. but is there a way to code differently so I avoid to
too long variable names ?
Thanks !

-Eric
Jul 22 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a

"Eric Boutin" <er**@nic.nac.wdyn.de> a écrit dans le message de
news:93*******************@weber.videotron.net...
Hi !
currently programming something that heavily use std::vector<std::string>
and std::map<std::string, std::string> . When compiling my program I have
like 1015 warnings : warning, debug info truncated to 255 character (because of the decoration, template and namespace stuffs). It's getting annoying.. it's longer to output the warning than to compile itself and when I get an
error I must pipe stderr and make a search for error to find the error. Is there any way I can avoid this ? I read the vc++ docs and theres no way to disable the warning.. but is there a way to code differently so I avoid to too long variable names ?
Thanks !

-Eric


I only know the VC++ way to do it : either use the #pragma warning (disable
: number) in your source code, or us the /Wd + # as a compiler option. I
suppose this is non standard, so you should ckeck in your compiler's doc.
Jul 22 '05 #2

P: n/a
"Eric Boutin" <er**@nic.nac.wdyn.de> wrote...
currently programming something that heavily use std::vector<std::string>
and std::map<std::string, std::string> . When compiling my program I have
like 1015 warnings : warning, debug info truncated to 255 character (because of the decoration, template and namespace stuffs). It's getting annoying.. it's longer to output the warning than to compile itself and when I get an
error I must pipe stderr and make a search for error to find the error. Is there any way I can avoid this ? I read the vc++ docs and theres no way to disable the warning..
This is just nonsense. See "#pragma warning".
but is there a way to code differently so I avoid to
too long variable names ?


It's not variable names you need to pay attention to. It's _types_.
No, you cannot avoid that. As soon as you say 'map<string,string>',
it expands it to 'map<basic_string<char, blah blah blah >, blah, blah >'
and there is no way around it. Disable the warning using #pragma
or learn to ignore it.

Victor
Jul 22 '05 #3

P: n/a
On Thu, 27 Nov 2003 18:48:23 -0500, "Eric Boutin"
<er**@nic.nac.wdyn.de> wrote:
currently programming something that heavily use std::vector<std::string>
and std::map<std::string, std::string> . When compiling my program I have
like 1015 warnings : warning, debug info truncated to 255 character (because
of the decoration, template and namespace stuffs). It's getting annoying..
it's longer to output the warning than to compile itself and when I get an
error I must pipe stderr and make a search for error to find the error. Is
there any way I can avoid this ? I read the vc++ docs and theres no way to
disable the warning.. but is there a way to code differently so I avoid to
too long variable names ?


There is a way:
#pragma warning(disable:4786)
// Suppress warning about lengthy name generated.

Sincerely,

Gene Wirchenko

Jul 22 '05 #4

P: n/a
ok thanks I'll fallow your hints

Thanks !
"Victor Bazarov" <v.********@comAcast.net> a écrit dans le message de
news:EEwxb.131862$Dw6.569651@attbi_s02...
"Eric Boutin" <er**@nic.nac.wdyn.de> wrote...
currently programming something that heavily use std::vector<std::string> and std::map<std::string, std::string> . When compiling my program I have like 1015 warnings : warning, debug info truncated to 255 character

(because
of the decoration, template and namespace stuffs). It's getting

annoying..
it's longer to output the warning than to compile itself and when I get an error I must pipe stderr and make a search for error to find the error.

Is
there any way I can avoid this ? I read the vc++ docs and theres no way

to
disable the warning..


This is just nonsense. See "#pragma warning".
but is there a way to code differently so I avoid to
too long variable names ?


It's not variable names you need to pay attention to. It's _types_.
No, you cannot avoid that. As soon as you say 'map<string,string>',
it expands it to 'map<basic_string<char, blah blah blah >, blah, blah >'
and there is no way around it. Disable the warning using #pragma
or learn to ignore it.

Victor

Jul 22 '05 #5

P: n/a
THANKS !!!!!

a LOT !

-Eric

by the way.. even with typedef there's no way to shorten a vector<string>
variable name ?

why haven't the compilator thought about this issue.. the STL means long
variable names..

"Gene Wirchenko" <gw**************@CAPITALSwencomine.com> a écrit dans le
message de news:1j********************************@4ax.com...
On Thu, 27 Nov 2003 18:48:23 -0500, "Eric Boutin"
<er**@nic.nac.wdyn.de> wrote:
currently programming something that heavily use std::vector<std::string>
and std::map<std::string, std::string> . When compiling my program I havelike 1015 warnings : warning, debug info truncated to 255 character (becauseof the decoration, template and namespace stuffs). It's getting annoying..it's longer to output the warning than to compile itself and when I get anerror I must pipe stderr and make a search for error to find the error. Isthere any way I can avoid this ? I read the vc++ docs and theres no way todisable the warning.. but is there a way to code differently so I avoid totoo long variable names ?


There is a way:
#pragma warning(disable:4786)
// Suppress warning about lengthy name generated.

Sincerely,

Gene Wirchenko

Jul 22 '05 #6

P: n/a
Heya Eric,

Eric Boutin wrote:
why haven't the compilator thought about this issue.. the STL means long
variable names..


They have - it's fixed in later compilers. You must be using VC++6.0,
which is getting quite long in the tooth nowdays.

Another option you have is to replace your version of the standard
library. STLPort (http://www.stlport.org/) have a great - and free -
library implementation that (from memory) uses quite short names for
their types when they can. It won't eliminate the problem but it does
alleviate it.

But I can highly recommend Visual C++ 7.1... :)

Cheers,
Matt

Jul 22 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.