This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
c99 and pthread.h
- From: Thorsten Kukuk <kukuk at suse dot de>
- To: libc-alpha at sourceware dot org
- Date: Mon, 9 Jan 2006 15:24:52 +0100
- Subject: c99 and pthread.h
Hi,
with current glibc CVS I get an error message if I use pthread.h,
mutex initializer and compile with -std=c99:
kukuk@firun:~/tmp> gcc -std=c99 pthread.h.c
pthread.h.c:3: error: extra brace group at end of initializer
pthread.h.c:3: error: (near initialization for 'plugin_mutex.__data')
pthread.h.c:3: warning: excess elements in struct initializer
pthread.h.c:3: warning: (near initialization for 'plugin_mutex.__data')
test program:
#include <pthread.h>
static pthread_mutex_t plugin_mutex = PTHREAD_MUTEX_INITIALIZER;
int
main ()
{
return 0;
}
--
Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de
SUSE LINUX Products GmbH Maxfeldstr. 5 D-90409 Nuernberg
--------------------------------------------------------------------
Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B