Re: VC6.0 SP6 BUG ?
- From: "SvenC" <SvenC@xxxxxxxxxxxxxxxx>
- Date: Wed, 27 Jun 2007 19:25:26 +0200
Hi,
I Installed VC6.0 and SP6 and found this problem, it there any one can
explain it?
To see the problem, compile this code fregment with "release mode",
switch any #if option to 0. The AfxMessageBox() show only one once!
void test()
{
#define countof(a) (sizeof(a)/sizeof(a[0]))
int map[4];
int mapcount = countof(map);
#if 1
for(int j=0; j<countof(map); j++)
#else
for(int j=0; j<mapcount; j++)
#endif
{
if(j< (mapcount/2) ){
int deep = (mapcount/2)-j;
deep*=20;
map[j] = deep;
}
else{
int height = j-(mapcount/2);
#if 1
height*=20;
#endif
#if 1
map[j] = height;
#endif
}
CString str;
str.Format("j=%d", j);
AfxMessageBox(str);
}
}
Yep, same for me: one messagebox only. If you turn optimization off, then it works correctly. Seems to be an optimizer bug.
--
SvenC
.
- Follow-Ups:
- Re: VC6.0 SP6 BUG ?
- From: Tom Serface
- Re: VC6.0 SP6 BUG ?
- Prev by Date: Re: MFC and COM with WMI
- Next by Date: Re: MFC and COM with WMI
- Previous by thread: Re: VC6.0 SP6 BUG ?
- Next by thread: Re: VC6.0 SP6 BUG ?
- Index(es):
Relevant Pages
|
Loading