Quote:
>I know this is mentioned in a number of MSDN articles, but I none of them
>have proven satisfactory.
>Does anyone know how to disable the Warning C4786 messages I get when using
>STL with VC 6. I've tried placing:
>#pragma warning( disable : C4786)
>in my code, but it doesn't do anything.
>This is a HUGE problem for me. With some of our source files we are getting
>upwards of 550 warnings PER FILE!
I feel your pain. When I upgraded to VC6, I had one file that began to
generate 23 new C4786's, and I've yet to find a way to suppress them. I
shudder to think of 550! Are you placing the #pragma before the #includes?
If you are, make sure no one is re-enabling the warning; if it is being
re-enabled, you may have to disable it all over the place, because the
warning context of a template definition doesn't follow it to its point of
instantiation, which can be hard to determine. Also, to avoid the more
serious C4503, I had to use good ol' #define to shorten some type names, and
I had to redesign some class templates to use fewer template parameters, and
that may have helped C4786 as well. BTW, the documentation for C4503 claims
the maximum length of a mangled name is 247 characters. That's obviously
wrong. It's much larger than that, but it's still too little.
Quote:
>Not only does this slow the compile
>process down immensely, but it also hides real and useful warning messages
>under a storm of useless and unimportant warnings. A compiler that generates
>too many warnings might as well generate none at all (since there's no easy
>way to remove the C4786 warnings from the list). And a compiler that
>generates (effectively) no warnings, is a complier that helps me write
>buggier code. Why would I want that? Do I really care that the de{*filter*}
>truncated some STL token name to 255 characters?!?
I care, but since I can't do anything about it, I wish they would just get
rid of the warning altogether.
Quote:
>This is doubly frustrating because this bug existed in VC 5 (as is evidenced
>by old MSDN technotes on the subject). Why didn't Microsoft fix this when
>they were producing version 6? I've written compilers before; fixing the
>broken #pragma function from above is not a difficult thing to do.
>Am I the only one who is bothered by this?
No. All I can suggest is that you report this at:
http://www.*-*-*.com/
--
Doug Harrison