[aspectc-user] usage of typedefed type names in pcds

Panu Bloigu panu.bloigu at mbnet.fi
Mon Jan 22 10:23:23 CET 2007


Hello.

I'm having problems with matching of pointcuts when pointcut expression
includes types defined with typedef. They simply don't seem to be get
matched. To see what I mean, please consider the following two files:

=================
File 1: main.cpp
=================
#include <iostream>
typedef int T;
T f(){return 10;}
int main()
{
	std::cout<<f()<<"\n";
	return 0;
};

=================
File 2: Aspect.ah
=================
#ifndef ASPECT_AH_
#define ASPECT_AH_
#include <iostream>
aspect Aspect
{
	advice call("T f()") : before()
	{
		std::cout<<"Before call.\n";
	}
};
#endif /*ASPECT_AH_*/

=====================================================

The call to f() isn't matched. If I change the expression so that instead of
T there is int, then the call gets matched. % works for this too.

There seem to be some bugs in BZ which concern typedef, but they seemed to
deal with a lot more complex examples than this. What I'm asking is

a) is this an instance of one of the bugs in BZ

or

b) is this an unlisted bug

or

c) Am I doing something wrong here?

Thanks is advance,

Panu.




More information about the aspectc-user mailing list