[Bug bootstrap/50982] gthr reorganization breakage
dje at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Nov 5 14:12:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50982
--- Comment #29 from David Edelsohn <dje at gcc dot gnu.org> 2011-11-05 14:11:35 UTC ---
The patch in comment 24 solves some of the problem. Thanks!
The error now is:
In file included from /farm/dje/src/src/libstdc++-v3/src/atomic.cc:28:0:
/tmp/20111104/powerpc-ibm-aix5.3.0.0/pthread/libstdc++-v3/include/mutex:763:30:
error: array must be initialized with a brace-enclosed initializer
/tmp/20111104/powerpc-ibm-aix5.3.0.0/pthread/libstdc++-v3/include/mutex:763:30:
error: too many initializers for 'std::once_flag::__native_type {aka
pthread_once_t}'
/tmp/20111104/powerpc-ibm-aix5.3.0.0/pthread/libstdc++-v3/include/mutex: In
function 'void std::call_once(std::once_flag&, _Callable&&, _Args&& ...)':
/tmp/20111104/powerpc-ibm-aix5.3.0.0/pthread/libstdc++-v3/include/mutex:818:64:
error: invalid conversion from 'void (*)(...)' to 'void (*)()' [-fpermissive]
On AIX pthread_once_t is a struct containing an array:
typedef struct
{
#ifdef __64BIT__
long __on_word[9];
#else
int __on_word[28];
#endif /* __64BIT__ */
}
pthread_once_t;
and the initializer is an array:
#ifdef __64BIT__
#define PTHREAD_ONCE_INIT \
{ \
0, \
0, \
0, \
0, \
0, \
_PTH_FLAGS_INIT64, \
0 \
}
#else
#define PTHREAD_ONCE_INIT \
{ \
0, \
0, \
0, \
0, \
0, \
0, \
0, \
2, \
0 \
}
#endif /* __64BIT__ */
The initializer has few words than the array because the rest are zero, but
matching the size does not solve the problem.
I also do not understand the conversion error:
extern int
pthread_once (pthread_once_t *, void (*)(void))
;
static inline int
__gthread_once (__gthread_once_t *__once, void (*__func) (void))
{
if (__gthread_active_p ())
return pthread_once (__once, __func);
else
return -1;
}
int __e = __gthread_once(&(__once._M_once), &__once_proxy);
I will upload the new atomic.ii
Thanks for your help.
More information about the Gcc-bugs
mailing list