Re: VC optimisation problem

If you use assembler (asm) instruction in your C or C++ code
you must disable optimalization for this file or part.
VC sometimes cannot correctly generate optimised-code
if you manualy change values of registers (bug ?).

Grzegorz Malicki

----- Original Message -----
From: “Akash Chouhan”
To: “NT Developers Interest List”
Sent: Thursday, April 03, 2003 11:22 AM
Subject: [ntdev] VC optimisation problem

> I have a service, which compiles and works ok in a
> debug build, but in the release build it doesn’t. The
> place where it fails is a call to RegQueryValueEx.
> While debugging I inserted a breakpoint in the
> function(a la _asm int 3) and traced, the code worked
> in the release build as well, but without the
> breakpoint it doesn’t.
> The code doesn’t work if I put the breakpoint outside
> the function.
> I inserted a “nop” in the same function and the code
> works. Is it a problem with the VC optimisation??
> ac