https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68948
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|c++ |middle-end Severity|major |normal --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- GCC trunk cannot compile this code at all: ../../third_party/android_tools/ndk//sources/cxx-stl/llvm-libc++/libcxx/include/__mutex_base: In constructor ‘constexpr std::__1::mutex::mutex()’: ../../third_party/android_tools/ndk//sources/cxx-stl/llvm-libc++/libcxx/include/__mutex_base:35:45: error: temporary of non-literal type ‘pthread_mutex_t’ in a constant expression ../../third_party/android_tools/ndk//platforms/android-16/arch-x86/usr/include/pthread.h:41:1: note: ‘pthread_mutex_t’ is not literal because: ../../third_party/android_tools/ndk//platforms/android-16/arch-x86/usr/include/pthread.h:42:18: note: non-static data member ‘pthread_mutex_t::value’ has volatile type Removing the volatile fixes that build issue.