[aspectc-user] cannot compile a simple program
Olaf Spinczyk
os at aspectc.org
Wed Jan 9 17:33:57 CET 2008
Hello Panu,
to me this looks like a bug. I was able to reproduce it and filed it in
Bugzilla (ID 353).
Thanks,
Olaf
Panu Bloigu wrote:
> 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.
> _______________________________________________
> aspectc-user mailing list
> aspectc-user at aspectc.org
> http://www.aspectc.org/mailman/listinfo/aspectc-user
>
More information about the aspectc-user
mailing list