On 15 July 2014 22:17, Iain Buclaw <[email protected]> wrote: > On 15 July 2014 22:07, bearophile via Digitalmars-d > <[email protected]> wrote: >> Johannes Pfau: >> >> >>> Well as described in the DIP it works just like shared from an >>> implementation point of view, so I doesn't add much complexity in the >>> compiler / type system. >> >> >> I am reading blogs about compiler bugs, and I see that the implementation of >> volatile is the buggiest part of GCC/Clang (and the Intel and Microsoft >> compilers). Despite numerous bug fixes, it's still a stubbornly buggy part. >> So it can't be as simple to implement correctly as you say. volatile fights >> against the optimization stages all the time. And I recognize that Walter >> has a significant experience on this topic, perhaps higher than yours. >> > > The use of volatile can be buggy in C because there is no other safe > way to do inter-thread communication. >
I say safe in the lightest possible terms. Volatile is in no way @safe.
