https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82481
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |ASSIGNED Last reconfirmed| |2017-10-11 Resolution|INVALID |--- Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- This would solve it: --- a/libstdc++-v3/include/std/mutex +++ b/libstdc++-v3/include/std/mutex @@ -688,6 +688,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __set_once_functor_lock_ptr(0); #endif +#ifdef __clang_analyzer__ + // PR libstdc++/82481 + __once_callable = nullptr; + __once_call = nullptr; +#endif + if (__e) __throw_system_error(__e); } But you should stop using whatever pre-release 7.0.1 build you're using, that's not a supported release.