|
From: Milian W. <ma...@mi...> - 2011-08-28 12:47:03
|
On Saturday 27 August 2011 23:44:02 Jeffrey Walton wrote: > Hi All, > > I want to use double checked initialization for a program, but I'm > catching some warnings from helgrind. A typical use is shown below. > > Its kind of tedious to run --gen-suppressions=yes for to develop > suppressions. Plus, the suppression rules are only applicable to the > current name mangling scheme. > > Is there a helgrind friendly way to write the initialization so that I > don't get a warning? Reading http://en.wikipedia.org/wiki/Double-checked_locking I'd think that the warnings are valid - no? Only MSVC apparently interpretes volatile in a way that would make this a safe pattern in C++. Can you explain why you think it's safe to use anyways, i.e. why you want to ignore the warnings? Thanks -- Milian Wolff ma...@mi... http://milianw.de |