[aspectc-user] NodeName: Error

Panu Bloigu panu.bloigu at mbnet.fi
Tue Dec 5 09:33:58 CET 2006


Hello.

Yet more information on the 'NodeName: Error'. The type pthread_mutex_t is
defined (atleast on my system) in pthread.h as an union:

typedef union
{
  struct __pthread_mutex_s
  {
    int __lock;
    unsigned int __count;
    int __owner;
    int __kind;
    unsigned int __nusers;
    __extension__ union
    {
      int __spins;
      __pthread_slist_t __list;
    };
  } __data;
  char __size[__SIZEOF_PTHREAD_MUTEX_T];
  long int __align;
} pthread_mutex_t;

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.

Panu.









More information about the aspectc-user mailing list