On Thu, Dec 20, 2007 at 07:57:23AM -0800, Trevor Talbot wrote:
> > I'd expect the compiler to optimize away those, but I'll make it a var
> > anyawy.
> 
> It can't; it's an opaque callout to kernel32.dll, and there's nothing
> that tells the optimizer when you can expect to get the same result.
> That said, it's cheaper than it looks, since the error code is stored
> at a fixed location in thread-specific VM space. I guess it wasn't
> interesting enough to make an MSVC intrinsic instead of keeping it a
> system detail.

Interesting. I was certainly it was an intrinsic, but it seems not...
Variable, it is..

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to