Value of x87 floating point control word can be checked with _control87
. When a new thread starts, on my platform it seems to inherit value of floating point control word from the parent thread.
Is this undefined behavior, or am I guaranteed that if I start a new thread, and the thread library has no bugs, the control word has the same value it had in the parent thread?
In which standard is this behavior defined, and how? If it is not defined in any standard, is it defined in the processor manual, or the operating system documentation?
I am using C++ language, developing on 64-bit Windows 7, compiling for 32-bit Windows target, and executing the code with an x86-compatible processor. I need an answer specifically for this platform, but if the behavior is the same for all languages and processors, then a generic answer would be better.