Click here to Skip to main content
15,913,758 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Const Char * etc Pin
Anders Molin23-Aug-01 1:26
professionalAnders Molin23-Aug-01 1:26 
GeneralRe: Const Char * etc Pin
Ray Kinsella23-Aug-01 1:54
Ray Kinsella23-Aug-01 1:54 
GeneralRe: Const Char * etc Pin
Anders Molin23-Aug-01 2:35
professionalAnders Molin23-Aug-01 2:35 
GeneralRe: Const Char * etc Pin
Ray Kinsella23-Aug-01 5:24
Ray Kinsella23-Aug-01 5:24 
GeneralRe: Const Char * etc Pin
23-Aug-01 6:14
suss23-Aug-01 6:14 
GeneralProblem in Windows 2000 Professional and Visual Studio 6 Enterprise Edition Pin
22-Aug-01 23:46
suss22-Aug-01 23:46 
QuestionHow to use PFA_JUSTIFY in RTF RichEdit ? Pin
22-Aug-01 20:42
suss22-Aug-01 20:42 
GeneralQuestions about #pragma warning disable Pin
Tony Belcher22-Aug-01 20:32
Tony Belcher22-Aug-01 20:32 
Has anyone out there used Billg's #pragma warning switch in a **large** VC++ project? We're gradually replacing MFC data structures with STL ones in an existing MFC-based project and like (I presume) everyone else we want to suppress the compiler warnings generated by the STL headers (especially the infamous 4786).

Sticking in some #pragmas would seem to be the way to go (as the samples in the MSDN do) but whereever I put them I find that some of the "disabled" warnings are still generated. Perhaps this indicates a problem with my understanding of how C++ source code is compiled.

I would have thought that each individual #pragma switch would apply to the translation unit(s) in which it appears. That is, if we have the appropriate #pragma switch at the top of "fred.cpp", the warning(s) would be disabled during the compilation of that unit, including during the compilation of all #include-d headers and the expansion of templates required by the unit. Also if we put the #pragma switch in "fred.h" and #include-d that in "barney.cpp" as well, the #pragma would be in effect during the compilation of both fred.cpp and barney.cpp.

At this stage I have two questions: 1) Is the above paragraph correct and 2) if so, does MSVC++ actually do it properly? If the answer to both questions is "yes" I'll know to go back and look more closely at why this is not happening in our project.


Tony
GeneralRe: Questions about #pragma warning disable Pin
Tomasz Sowinski22-Aug-01 23:21
Tomasz Sowinski22-Aug-01 23:21 
GeneralRe: Questions about #pragma warning disable Pin
Anders Molin22-Aug-01 23:28
professionalAnders Molin22-Aug-01 23:28 
QuestionHow get ViewList from MainFrame Pin
22-Aug-01 20:06
suss22-Aug-01 20:06 
AnswerRe: How get ViewList from MainFrame Pin
23-Aug-01 13:01
suss23-Aug-01 13:01 
GeneralA Question About Asynchronous Property Pin
Maer72722-Aug-01 19:41
Maer72722-Aug-01 19:41 
GeneralDialog Box and String lengths Pin
22-Aug-01 17:11
suss22-Aug-01 17:11 
GeneralRe: Dialog Box and String lengths Pin
Jim A. Johnson22-Aug-01 18:35
Jim A. Johnson22-Aug-01 18:35 
GeneralRe: Dialog Box and String lengths Pin
Jim A. Johnson22-Aug-01 18:35
Jim A. Johnson22-Aug-01 18:35 
GeneralCatching Keystrokes from a CEditView Pin
Joseph LeBlanc22-Aug-01 16:03
Joseph LeBlanc22-Aug-01 16:03 
GeneralRe: Catching Keystrokes from a CEditView Pin
Tomasz Sowinski22-Aug-01 23:28
Tomasz Sowinski22-Aug-01 23:28 
GeneralModaless Dialog Box Pin
John Uhlenbrock22-Aug-01 11:23
John Uhlenbrock22-Aug-01 11:23 
GeneralRe: Modaless Dialog Box Pin
John Uhlenbrock22-Aug-01 12:13
John Uhlenbrock22-Aug-01 12:13 
GeneralRe: Modaless Dialog Box Pin
Christian Graus22-Aug-01 12:35
protectorChristian Graus22-Aug-01 12:35 
GeneralRe: Modaless Dialog Box Pin
John Uhlenbrock22-Aug-01 12:41
John Uhlenbrock22-Aug-01 12:41 
GeneralRe: Modaless Dialog Box Pin
Christian Graus22-Aug-01 12:46
protectorChristian Graus22-Aug-01 12:46 
GeneralRe: Modaless Dialog Box Pin
John Uhlenbrock22-Aug-01 13:03
John Uhlenbrock22-Aug-01 13:03 
GeneralRe: Modaless Dialog Box Pin
Christian Graus22-Aug-01 13:08
protectorChristian Graus22-Aug-01 13:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.