gcc-4.7-20111022 fails to build on PA-RISC
Jonathan Wakely
jwakely.gcc@gmail.com
Sat Oct 29 18:33:00 GMT 2011
On 29 October 2011 19:01, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> What does the definition of _pthread_fastlock on line 34 of
> /usr/include/bits/pthreadtypes.h look like?
>
Don't worry, I foudn the definition on an hppa-linux machine, and can
reproduce the problem even with the latest std::mutex code
e.g.
typedef volatile struct {
int lock[4];
} __attribute__ ((aligned(16))) __atomic_lock_t;
struct _pthread_fastlock
{
__atomic_lock_t __spinlock;
};
typedef struct {
struct _pthread_fastlock lock;
} pthread_mutex_t;
struct mutex {
pthread_mutex_t m = { };
mutex() = default;
};
int main()
{
mutex mx;
}
The problem is that the mutex contains a volatile type and can't be
copied by the implicit-declared copy constructor.
I'll have to look into this further tomorrow to see if it's a G++
problem or something we need to work around in the library.
More information about the Gcc-help
mailing list