From 67c330aec42b2b57cf42abc7ceb46865d51cd789 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Fri, 27 Nov 2009 15:17:04 +0000 Subject: re PR target/41810 (Cannot build gcc: gthr-default.h:466: error: '__mutex' was not declared in this scope) PR target/41810 * gthr-solaris.h (__gthread_mutex_destroy): Remove UNUSED. [SUPPORTS_WEAK && GTHREAD_USE_WEAK] (__gthread_active_p): Use __extension__ to allow cast from function pointer to object pointer in C++. * doc/install.texi (--enable-threads): Clarify use of Solaris threads. From-SVN: r154708 --- gcc/gthr-solaris.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc/gthr-solaris.h') diff --git a/gcc/gthr-solaris.h b/gcc/gthr-solaris.h index af2c37f..5aed7ad 100644 --- a/gcc/gthr-solaris.h +++ b/gcc/gthr-solaris.h @@ -102,7 +102,8 @@ __gthrw(cond_signal) static inline int __gthread_active_p (void) { - static void *const __gthread_active_ptr = (void *) &__gthrw_(thr_create); + static void *const __gthread_active_ptr + = __extension__ (void *) &__gthrw_(thr_create); return __gthread_active_ptr != 0; } @@ -460,7 +461,7 @@ __gthread_setspecific (__gthread_key_t __key, const void *__ptr) } static inline int -__gthread_mutex_destroy (__gthread_mutex_t * UNUSED(__mutex)) +__gthread_mutex_destroy (__gthread_mutex_t *__mutex) { if (__gthread_active_p ()) return __gthrw_(mutex_destroy) (__mutex); -- cgit v1.1