[aspectc-user] advice "Foo": struct Bar{}; advice "Foo": static Bar member;

Szczepan Hołyszewski rulatir at wp.pl
Fri Feb 17 19:35:37 CET 2006


Hello,

I cannot introduce a nested struct, and then a static member which is
an instance of the introduced nested struct. Is this illegal? I
suspect a bug because the error message is somewhat vague. I am not
certain however that my non-inline intro syntax is OK so please check
me:

--main.cc------------------------------------------------

class Foo {};

aspect IntroduceStructAndStaticMember
{
public:
    advice "Foo": struct Bar {};
    advice "Foo": static Bar member;
};

//is this the right way?

advice "Foo": Bar IntroduceStructAndStaticMember::member;

--from Eclipse console (newlines doubled)--------------------------

"c:/eclipse/plugins/org.aspectc.compiler.win32_0.9.92/AC/ag++.exe" --c_compiler
mingw32-g++ --keep_acc -r repo.acp -p .. -c ../main.cc --Xcompiler -o
main.o -D_useAC -O0 -g3 -Wall -fmessage-length=0 -I..

<anonymous unit>:1: error: invalid declaration near token `Foo'

error: Execution failed:
""c:/eclipse/plugins/org.aspectc.compiler.win32_0.9.92/AC/ac++" --config
"puma.config" -rrepo.acp -p".." -D_useAC -I".." -c "../main.cc" -o
"main.acc""

--end of Eclipse console-------------------------------------------

The error message seems to be:

<anonymous unit>:1: error: invalid declaration near token `Foo'

The woven file main.acc is not created.

Any ideas? If this is an AC bug then I will file it at bugzilla.

Thanks in advance,
Szczepan Holyszewski 




More information about the aspectc-user mailing list