I wonder why gcc is able to compile it. :-)
Well considering that the following also yields different results on MSVC7.1 and gcc 3.2/3.3 I would wonder if there is a problem with one of the compilers
#include <iostream>
#include
Do you really have a volatile member function somewhere? I thought that they were "officially" worthless.
Well, that is a different matter. If one might want to follow Andrei's suggestion of using volatile to encapsulate synchronisation then they are still worthwhile. (CUJ February 2001).