// JP opened flex table

Click to See Complete Forum and Search --> : BUG REPORT


Viorel Bejan
October 30th, 2000, 10:05 AM
The following code can produce an unpredictable result (crash) when running in Release mode with optimizations:


volatile int a = 0;

switch(a) {
case 0:
// nothing
break;
case 1:
// nothing
break;
default:
ASSERT(0); __assume(0);
}

AfxMessageBox("Click <OK> to continue");





The code works correctly in Debug mode (without optimizations).

To reproduce the bug, use Visual C++ 6.0 with Service Pack 4, create an MFC-based project (e.g., Dialog Based Application with MFC support) and set the default "Win32 Release" configuration, generated by Application Wizard. Insert the sample code in your program, e.g. in "OnInitDialog" member function.

The code is compiled without bug if the "__assume(0)" statement is removed, or if the "case" sequences are not empty, or if the optimization options are turned off.

Vladdy
November 18th, 2000, 10:37 AM
Send bug report to the developers of Microsoft Visual C++. It infringes on our interests.

//JP added flex table