VC 5.0 and 6.0 Debugger Bug 
Author Message
 VC 5.0 and 6.0 Debugger Bug

Hi!
This a very dangerous bug!!!

Run this code:

/////////////////
#include <stdio.h>
int main()
{
        int number;
        number = 1;

        if(1)
        {
                int number;
                number = 0;
        }

        if(number) // Put a breakpoint here and read the value of
                   // number. The watch says number = 0
                   // Althought the string will be printed. Corect.
                   // But the de{*filter*} can trap you by showing a wrong value
        {
                printf("This string will be printed\n");
        }
        return 0;

Quote:
}

//////////////

florin



Sun, 15 Apr 2001 03:00:00 GMT  
 VC 5.0 and 6.0 Debugger Bug
Hmmm...even if this is a bug, I'd be confused myself about which 'number'
to use...

Quote:

>Hi!
>This a very dangerous bug!!!

>Run this code:

>/////////////////
>#include <stdio.h>
>int main()
>{
>        int number;
>        number = 1;

>        if(1)
>        {
>                int number;
>                number = 0;
>        }

>        if(number) // Put a breakpoint here and read the value of
>                   // number. The watch says number = 0
>                   // Althought the string will be printed. Corect.
>                   // But the de{*filter*} can trap you by showing a wrong value
>        {
>                printf("This string will be printed\n");
>        }
>        return 0;
>}
>//////////////

>florin

--------------------------------------------------------------------------------

Principal Software Engineer       Corporate Web Page:     http://www.*-*-*.com/

Eden Prairie, MN                  Personal Home Page:   http://www.*-*-*.com/ ~nde

"Question authority...and the authorities will end up questioning YOU!"
--------------------------------------------------------------------------------



Sun, 15 Apr 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VC 5.0 and 6.0 Debugger Bug

2. Disabling the VC debugger in VC 6.0

3. Debugging VC 6.0 Project under VC 5.0

4. Co-install of VC 5.0 and VC 6.0

5. : VC 5.0 vs VC 6.0 incompatibility

6. VC 5.0 and VC 6.0 compatibility problem ?

7. vc++ 5.0 to vc++ 6.0 problem

8. : VC 5.0 vs VC 6.0 run time incompatibility

9. : VC 5.0 and VC 6.0 run time compatibility

10. Problem upgrading from VC 5.0 to VC 6.0

11. VC 6.0 breaks VC 5.0 DLLs?

 

 
Powered by phpBB® Forum Software