[aspectc-user] NodeName: Error

Matthias Urban matthias.urban at pure-systems.com
Tue Dec 5 10:38:29 CET 2006


Hi Panu,

> Yet more information on the 'NodeName: Error'. The type pthread_mutex_t is
> defined (atleast on my system) in pthread.h as an union:
> 
> ...
> 
> and the PTHREAD_MUTEX_INITIALIZER in turn is a macro:
> 
> # define PTHREAD_MUTEX_INITIALIZER { { 0, 0, 0, 0, 0, { 0 } } }
> 
> Obviously I can not go about doing the initialization of a variable of type
> pthread_mutex_t in the class declaration through the kind of assignment as
> shown in my previous post. However, what's wrong here is that AspectC++
> compiler won't let the proper error message go through. What sould be show
> by the compiler is something like (as with g++ 4.1.1):
> 
> error: a brace-enclosed initializer is not allowed here before '{' token
> error: ISO C++ forbids initialization of member 'mutex'
> error: making 'mutex' static
> error: invalid in-class initialization of static data member of non-integral
> type 'pthread_mutex_t'
> 
> Also, compilation process seems to stop after 'NodeName: Error'. If there
> are any more syntax errors, they are not shown.
> 
> Hope this helps.

Thank you for this detailed analysis. It helped a lot. I've added a 
corresponding bug report (#325).

Best regards,
Matthias



More information about the aspectc-user mailing list