Click here to Skip to main content
15,914,071 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Support MultiLanguage in VC Pin
Masaaki Onishi1-Apr-01 16:02
Masaaki Onishi1-Apr-01 16:02 
GeneralMy problem is: Pin
hs1-Apr-01 16:35
hs1-Apr-01 16:35 
GeneralRe: My problem is: Pin
Masaaki Onishi1-Apr-01 17:56
Masaaki Onishi1-Apr-01 17:56 
GeneralRe: Support MultiLanguage in VC Pin
l a u r e n2-Apr-01 6:45
l a u r e n2-Apr-01 6:45 
GeneralRe: Support MultiLanguage in VC Pin
Masaaki Onishi2-Apr-01 7:08
Masaaki Onishi2-Apr-01 7:08 
Generaldot operator menu... Pin
Cam1-Apr-01 15:28
Cam1-Apr-01 15:28 
GeneralRe: dot operator menu... Pin
Christian Graus1-Apr-01 17:07
protectorChristian Graus1-Apr-01 17:07 
Generaltry / catch : not compiled && unreachable in release build. Pin
Matt Cooper1-Apr-01 14:54
Matt Cooper1-Apr-01 14:54 
Apparently my compiler (it's VC6.0) has decided that try and the following catch block are not needed in release mode, and I have not the slightest clue as to why. For example, if I create a new dialog app and put this code in it:

void CJunkDlg::OnButton1()
{
char *p = 0;
try
{ *p = '\0'; }
catch(...){ AfxMessageBox("!"); }
}

and compile in debug.. click.. "!". That's expected behavior!
Rebuild it in release and I get an access violation as if the try/catch wasn't there.
I've checked the compiler settings. I have /GX. That's the default for a new project after all!

If I put the warning level on 4 and rebuild, I get the warning C4702: unreachable code when in release, and nothing in debug. If I disable optimizations in release, the warnings evaporate and the catch(...) works as advertised. For obvious reasons, that's not the solution I'm looking for.

Here's a snippet of the assembly generated in release with full optimization (it looks bizarre to me):

00401494 nop
00401495 nop
00401496 nop
00401497 nop
00401498 nop
00401499 nop
0040149A nop
0040149B nop
0040149C nop
0040149D nop
0040149E nop
0040149F nop
004014A0 mov byte ptr ds:[0],0 <<< *p = '\0';
004014A7 ret
004014A8 nop
004014A9 nop
004014AA nop
004014AB nop
004014AC nop
004014AD nop
004014AE nop
004014AF nop

What's with all the nop's?

I really hope someone out there has seen this before. Thanks much if you can help!

Matt
GeneralRe: try / catch : not compiled && unreachable in release build. Pin
Tim Deveaux2-Apr-01 6:54
Tim Deveaux2-Apr-01 6:54 
GeneralRe: try / catch : Oops - fogot something... Pin
Tim Deveaux2-Apr-01 13:33
Tim Deveaux2-Apr-01 13:33 
GeneralRe: try / catch Pin
Matt Cooper2-Apr-01 19:54
Matt Cooper2-Apr-01 19:54 
GeneralRe: try / catch Pin
Tim Deveaux3-Apr-01 13:45
Tim Deveaux3-Apr-01 13:45 
GeneralRe: try / catch Pin
Matt Cooper4-Apr-01 18:27
Matt Cooper4-Apr-01 18:27 
Generaltwo q's..._T("What the heck?") and handling CString's as float's Pin
Cam1-Apr-01 13:22
Cam1-Apr-01 13:22 
GeneralRe: two q's..._T( Pin
Christian Graus1-Apr-01 13:52
protectorChristian Graus1-Apr-01 13:52 
GeneralRe: two q's..._T( Pin
Cam1-Apr-01 15:20
Cam1-Apr-01 15:20 
GeneralRe: two q's..._T( Pin
PJ Arends1-Apr-01 14:22
professionalPJ Arends1-Apr-01 14:22 
GeneralRe: two q's..._T( Pin
3-Apr-01 3:40
suss3-Apr-01 3:40 
GeneralExporting Constants from Vc Dll Pin
Sabith Mannadiar1-Apr-01 4:45
Sabith Mannadiar1-Apr-01 4:45 
GeneralRe: Exporting Constants from Vc Dll Pin
l a u r e n1-Apr-01 9:57
l a u r e n1-Apr-01 9:57 
QuestionHow to Associate ImageList 6 to ListView 6 in VC++ Pin
1-Apr-01 0:43
suss1-Apr-01 0:43 
AnswerRe: How to Associate ImageList 6 to ListView 6 in VC++ Pin
Brendan Tregear1-Apr-01 15:46
Brendan Tregear1-Apr-01 15:46 
Generalexec Pin
Starodubtsev Sergey1-Apr-01 0:15
Starodubtsev Sergey1-Apr-01 0:15 
GeneralRe: exec Pin
Mustafa Demirhan1-Apr-01 1:09
Mustafa Demirhan1-Apr-01 1:09 
GeneralStrange kind of class Pin
Ahmad31-Mar-01 22:21
Ahmad31-Mar-01 22:21 

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.