[aspectc-user] A bug in JoinPoint method generation?

Panu Bloigu panu.bloigu at mbnet.fi
Fri Dec 15 11:17:36 CET 2006


> ac++ analyses the advice code in order to find out which parts of the
> join point API are actually used. Based on this information the amount
> of context information, which the wrapper code for affected join points
> has to provide, can be tailored down to the minimum. The problem is that
> templates that are instantiated by the advice code are not analyzed yet.
> Therefore, ac++ does not know that the arg and result functions are
> needed and, thus, doesn't generate them. Bang.

I kind of figured something like this was going on and then went to see if
it's in bugzilla. I couldn't find it there so that's why I posted here.

> As a workaround you can simply [call] the needed join point API functions
> within the advice body.

Yep, I did this.

> BTW, you can also implement a different behavior for functions that are
> declared as returning void at compile time. You could use the result
> type (provided by the join point API) as a template parameter. The
> template could be specialized for the argument type 'void'.

And then I did this too. Together these two allow me to do all that I need.

And as a side note I might add that --keep_acc is a lifesaver. ;)

Anyway, thanks for the info.


More information about the aspectc-user mailing list