[aspectc-user] Problem with doing simple weaving on FreeBSD

Carsten V. Munk cvm at daimi.au.dk
Tue Jan 31 14:50:45 CET 2006


When using #include <sys/types.h> in a simple program:

#include <sys/types.h>

int main(int argc, char *argv[])
{
	return 0;
}

, and trying to compile using ag++ (1.0pre2), it errors with

/usr/include/sys/_types.h:80: error: invalid type specified in declaration
error: Execution failed: "ac++" --config "puma.config"  -p. -c "bar.cc" 
-o "bar.acc"

The lines mentioned are:
78: typedef int             __ct_rune_t;    /* arg type for ctype funcs */
79: typedef __ct_rune_t     __rune_t;       /* rune_t (see above) */
80: typedef __ct_rune_t     __wchar_t;      /* wchar_t (see above) */
81: typedef __ct_rune_t     __wint_t;       /* wint_t (see above) */


I've traced this down to fail on this specific example, which the 
FreeBSD system include files use in these lines:

typedef int foo_t;
typedef foo_t __wchar_t;

foo.cc:2: error: invalid type specified in declaration
error: Execution failed: "ac++" --config "puma.config"  -p. -c "foo.cc" 
-o "foo.acc"

Is the inability to declare a type with type __wchar_t the fault of the 
FreeBSD include files (since they're problematic?) or is it a bug in 
AspectC++? The examples compile fine in g++

Regards,
Carsten Munk



More information about the aspectc-user mailing list