Click here to Skip to main content
15,912,400 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Why do I get warning C4748? Pin
Maximilien23-Sep-10 3:34
Maximilien23-Sep-10 3:34 
QuestionRe: Why do I get warning C4748? Pin
David Crow23-Sep-10 4:21
David Crow23-Sep-10 4:21 
AnswerRe: Why do I get warning C4748? Pin
Maximilien23-Sep-10 4:43
Maximilien23-Sep-10 4:43 
GeneralRe: Why do I get warning C4748? Pin
Stefan_Lang23-Sep-10 4:34
Stefan_Lang23-Sep-10 4:34 
GeneralRe: Why do I get warning C4748? Pin
Luc Pattyn23-Sep-10 4:48
sitebuilderLuc Pattyn23-Sep-10 4:48 
GeneralRe: Why do I get warning C4748? Pin
Stefan_Lang23-Sep-10 6:55
Stefan_Lang23-Sep-10 6:55 
GeneralRe: Why do I get warning C4748? Pin
Luc Pattyn23-Sep-10 7:16
sitebuilderLuc Pattyn23-Sep-10 7:16 
AnswerRe: Why do I get warning C4748? [modified] Pin
Stefan_Lang23-Sep-10 23:03
Stefan_Lang23-Sep-10 23:03 
I've found the culprit. It's the external library declarations. Apparently all or most of them contain lines like this:
# ifdef NT
#  ifdef _DEBUG
#   pragma comment( lib, "geomkern70d.lib") /* force link in VC++ */
#  else
#   pragma comment( lib, "geomkern70.lib") /* force link in VC++ */
#  endif
#  pragma optimize("", off)
# endif

Note the #pragma optimize line, that is executed independent of whether or not this is debug code (i. e. it's outside the #ifdef _DEBUG block)! OMG | :OMG: This will affect every file that directly or indirectly references this external library! (or any other external library with similar DECL headers)

Obviously, this line overrides the project settings, and thus code does not get optimized, no matter what I say Thumbs Down | :thumbsdown:

I will now go and investigate why this line is in there, and whether or not it's safe to remove it. Provided I can still find anyone who was around at the time this code was written...

P.S.: the reason I posted the whole context was that I found a whole bunch of *decl* header files looked exactly like that, so I at first assumed it was generated, either by VS 2003, or whatever IDE was being used at the time these were created. I am still not sure about that...

modified on Friday, September 24, 2010 7:02 AM

QuestionArray traversal Pin
T.RATHA KRISHNAN23-Sep-10 1:31
T.RATHA KRISHNAN23-Sep-10 1:31 
AnswerRe: Array traversal Pin
_AnsHUMAN_ 23-Sep-10 2:02
_AnsHUMAN_ 23-Sep-10 2:02 
GeneralRe: Array traversal Pin
Emilio Garavaglia23-Sep-10 4:11
Emilio Garavaglia23-Sep-10 4:11 
GeneralRe: Array traversal Pin
Niklas L23-Sep-10 21:04
Niklas L23-Sep-10 21:04 
AnswerRe: Array traversal Pin
KarstenK23-Sep-10 3:11
mveKarstenK23-Sep-10 3:11 
QuestionRemove Features/components from Windows 7 [modified] Pin
Aabid22-Sep-10 23:13
Aabid22-Sep-10 23:13 
AnswerRe: Remove Features/components from Windows 7 Pin
Maximilien23-Sep-10 0:51
Maximilien23-Sep-10 0:51 
GeneralRe: Remove Features/components from Windows 7 Pin
Aabid23-Sep-10 1:04
Aabid23-Sep-10 1:04 
QuestionView Pin
john563222-Sep-10 21:52
john563222-Sep-10 21:52 
AnswerRe: View [modified] Pin
mesajflaviu22-Sep-10 22:15
mesajflaviu22-Sep-10 22:15 
QuestionDrawing Pin
Benjamin Bruno22-Sep-10 7:29
Benjamin Bruno22-Sep-10 7:29 
QuestionRe: Drawing Pin
David Crow22-Sep-10 8:06
David Crow22-Sep-10 8:06 
AnswerRe: Drawing Pin
sharp prospector23-Sep-10 4:14
sharp prospector23-Sep-10 4:14 
QuestionCListCtrl Border Pin
john563222-Sep-10 6:50
john563222-Sep-10 6:50 
AnswerRe: CListCtrl Border Pin
Maximilien22-Sep-10 8:46
Maximilien22-Sep-10 8:46 
GeneralRe: CListCtrl Border Pin
john563222-Sep-10 22:42
john563222-Sep-10 22:42 
AnswerRe: CListCtrl Border Pin
Rolf Kristensen23-Sep-10 0:49
Rolf Kristensen23-Sep-10 0:49 

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.