On Thu, Oct 24, 2002 at 09:21:54AM +0200, Niels Möller wrote: > Vicente Hernando Ara <[EMAIL PROTECTED]> writes: > > > * This last is an error I get in exec.c file. > > static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; > > This trigger an error when compiling: > > exec.c:1382: initializer element is not constant > > > > however: > > pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; > > compiles ok. Why is that? > > Appearantly, PTHREAD_MUTEX_INITIALIZER is not a constant expression. > Perhaps that's a bug, I'd expect the pthreads spec to require that > it's constant, but I haven't read that.
It was an early bug in Neals code, which made it a compound statement (Neal was trying to make soemthing that looks like a struct foo cast, but that makes it a compound statement, and that is not constant, see the discussion from gcc bug list that was CC'ed here a few weeks ago). I think it is fixed in CVS by now, but I can not check. In fact, I am not here. You didn't see this email :) Thanks, Marcus _______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd