This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]