|
-
October 31st, 2001, 03:02 AM
#1
#pragma warning (disable : 4786)
I use list and set templates in my SDI MFC APP. well, I have no problems with them, but always when I rebuild the whole project I get 40 warnings!
I tried to disable them by using:
#pragma warning (disable : 4786)
but I still get some warnings. question: where exactly do I have to place this? in *.cpp or *.h files? do I have to care about a special position to place it? is my pragma wrong?
example of a warning:
c:\program files\microsoft visual studio\vc98\include\xtree(160) : warning C4786: 'std::_Tree<CScene3DS *,CScene3DS *,std::set<CScene3DS *,std::less<CScene3DS *>,std::allocator<CScene3DS *> >::_Kfn,std::less<CScene3DS *>,std::allocator<CScene3DS *>
>::_Tree<CScene3DS *,CScene3DS *,std::set<CScene3DS *,std::less<CScene3DS *>,std::allocator<CScene3DS *> >::_Kfn,std::less<CScene3DS *>,std::allocator<CScene3DS *> >' : identifier was truncated to '255' characters in the debug information
thanks a lot in advance!
Yannick
-
October 31st, 2001, 03:13 AM
#2
Re: #pragma warning (disable : 4786)
BUG: C4786 Warning Is Not Disabled with #pragma Warning
Q167355
--------------------------------------------------------------------------------
The information in this article applies to:
Microsoft Visual C++, 32-bit Enterprise Edition, versions 5.0, 6.0
Microsoft Visual C++, 32-bit Professional Edition, versions 5.0, 6.0
Microsoft Visual C++, 32-bit Learning Edition, version 6.0
--------------------------------------------------------------------------------
SYMPTOMS
Warnings similar to the following are generated even if you use the warning pragma to disable the warning:
warning C4786:
'std::rb_tree<CAiSpanningTree<State,std::less<State>>::TransClosureNode, CAiSpanningTree<State,std::less<State>>::TransClosureNode,std::ident<Cai SpanningTree<State,std::less<State>>::TransClosureNode,CAiSpanningTree<S tate,std::less<State>>::TransClosureNode>,std::less<CAiSpanningTree<Stat e,std::less<State>>::TransClosureNode>>' : identifier was truncated to '255' characters in the debug information
The code:
#pragma warning(disable:4786)
disables warnings that list the file and line number. For example:
C:\test\Text.cpp(25) : warning C4786:
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
MORE INFORMATION
This warning can be ignored. However, the identifier may not be accessible or viewable in the debugger.
Gabriel.
_
Forever trusting who we are
And nothing else matters - Metallica
_
-
October 31st, 2001, 03:17 AM
#3
Re: #pragma warning (disable : 4786)
Write it in StdAfx.h, before all includes... and if you have still the warnings, look at the post of Gabriel.
I am Miss Maiden... Miss Iron Maiden :-D
-
October 31st, 2001, 03:27 AM
#4
Re: #pragma warning (disable : 4786)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|