Fix profiler sync issue#47214
Conversation
|
Tagging subscribers to this area: @tommcdon Issue DetailsBecause there was not a named variable some compilers were optimizing out the RAII guard.
|
|
Is this a legal optimization? It seems not. |
|
@GSPP With the first version
The key here is that the temporary does not have automatic storage duration, but the named variable does. So it seems like a perfectly legal optimization to me |
|
Thanks for explaining. This was beyond my knowledge of C++. |
Because there was not a named variable some compilers were optimizing out the RAII guard.