Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/doc document g++ 5.1 + libpthread volatile workaround (PR li...



details:   https://anonhg.NetBSD.org/src/rev/0a26fbd32e81
branches:  trunk
changeset: 809226:0a26fbd32e81
user:      pooka <pooka%NetBSD.org@localhost>
date:      Fri Jun 26 10:25:41 2015 +0000

description:
document g++ 5.1 + libpthread volatile workaround (PR lib/49989)

diffstat:

 doc/HACKS |  24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diffs (38 lines):

diff -r 5225514f8939 -r 0a26fbd32e81 doc/HACKS
--- a/doc/HACKS Fri Jun 26 10:05:17 2015 +0000
+++ b/doc/HACKS Fri Jun 26 10:25:41 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.159 2015/05/08 09:44:45 martin Exp $
+# $NetBSD: HACKS,v 1.160 2015/06/26 10:25:41 pooka Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -381,6 +381,28 @@
        used in the link(2) system call.
 kcah
 
+hack   g++ 5.1 barfs on volatile in initializers
+cdata  26 Jun 2015
+who    pooka
+file   src/lib/libpthread/pthread_types.h      : 1.14
+file   src/lib/libpthread/pthread_types.h      : 1.15
+pr     lib/49989
+descr
+       Trying to use e.g. pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER
+       in C++ results in:
+               error: temporary of non-literal type '__pthread_mutex_st'
+               in a constant expression
+               constexpr mutex() _NOEXCEPT : __m_(PTHREAD_MUTEX_INITIALIZER) {}
+               [...]
+               include/pthread_types.h:101:8: note: '__pthread_mutex_st' is
+               not literal because:
+               struct __pthread_mutex_st {
+               ^
+               include/pthread_types.h:103:17: note:   non-static data
+               member '__pthread_mutex_st::ptm_errorcheck' has volatile type
+               pthread_spin_t ptm_errorcheck;
+kcah
+
 port   vax
 
        hack    gcc4/vax ICE



Home | Main Index | Thread Index | Old Index