[aspectc-user] cannot compile a simple program
Panu Bloigu
panu.bloigu at gmail.com
Tue Jan 8 14:54:29 CET 2008
Hello.
I seem to have trouble compiling a simple program of following three
files. Before listing the uncompilable source code, I want to deeply
apologize if there's some obvious syntax error that I have missed that
causes the compilation errors. If not, then this might demonstrate a bug
in ac++. The following results are the same with both an SVN version
from today and 1.0pre3.
==============================================
File: Base.ah
==============================================
#ifndef _BASE_AH_
#define _BASE_AH_
aspect Base
{
pointcut virtual pc() = 0;
advice pc() : around()
{
tjp->proceed();
}
};
#endif
==============================================
==============================================
File: Derived.ah
==============================================
#ifndef _DERIVED_AH_
#define _DERIVED_AH_
#include "Base.ah"
aspect Derived : public Base
{
pointcut pc() = execution("void test()");
advice pc() : around()
{
tjp->proceed();
}
};
#endif
==============================================
==============================================
File neworder.cpp
==============================================
void test(){}
int main()
{
test();
return 0;
}
==============================================
When I issue the following command:
==============================================
ag++ -k --keep_acc neworder.cpp -o neworder
==============================================
the compiler (SVN version) outputs the following:
==============================================
warning: Usage of --keep_acc is deprecated use --keep_woven instead
neworder.acc: In member function ‘void TJP__ZN4testEv_1<TResult, TThat,
TTarget, TArgs>::proceed()’:
neworder.acc:93: error: ‘invoke_Derived_Base_a0_around’ is not a member
of ‘AC’
neworder.acc:93: error: expected primary-expression before ‘>’ token
error: Execution failed: "g++" -xc++ "neworder.acc" -xnone -I "." -o
"neworder"
==============================================
Can anyone spot an obvious error in my code? Or is this a valid bug in ac++?
Thanks,
--Panu.
More information about the aspectc-user
mailing list