[aspectc-user] compile error
Olaf Spinczyk
Olaf.Spinczyk at informatik.uni-erlangen.de
Wed Oct 22 18:23:22 CEST 2003
Hi Sven,
Sven Apel wrote:
> Hello,
>
> after the code weaving during the compilation process I get the follwoing error message:
>
> ac++ -v1 -I . -p . -d aspect-out
> * Running ac++ 0.7.2
> * Simple Dependency Check
> * Handling Translation Unit `main.cc'.
> * Handling Translation Unit `SmartPointer.cc'.
> * Handling include files and link-once code
> * Saving
> * Done
> make -C aspect-out
> make[1]: Entering directory `/home/apel/Entwicklung/Lokale Entwicklung/GarbageCollection/aspect-out'
> g++ -c main.cc ac_gen.cc SmartPointer.cc
> ./SmartPointer.cc:9: error: `undefined' was not declared in this scope
> ./SmartPointer.cc:9: error: syntax error before `(' token
> ./SmartPointer.cc:15: error: `undefined' was not declared in this scope
> ./SmartPointer.cc:15: error: syntax error before `(' token
> ./SmartPointer.cc:17: error: `undefined' was not declared in this scope
> ./SmartPointer.cc:17: error: '
> a0_after_GarbageCollector_call_SmartPointerSmartPointer_F12SmartPointeru11'
> is used as a type, but is not defined as a type.
> ./SmartPointer.cc:18: error: parse error before `}' token
> ./SmartPointer.cc: In constructor `SmartPointer::SmartPointer(void*)':
> ./SmartPointer.cc:21: error: `
> __call_SmartPointerSmartPointer_F12SmartPointeru11' undeclared (first use
> this function)
> ./SmartPointer.cc:21: error: (Each undeclared identifier is reported only once
> for each function it appears in.)
> ./SmartPointer.cc:21: error: `undefined' undeclared (first use this function)
> ./SmartPointer.cc:21: error: `PvE_0_0' undeclared (first use this function)
> ./SmartPointer.cc: At global scope:
> ./SmartPointer.cc:25: error: syntax error before `~' token
> ./SmartPointer.cc:31: error: syntax error before `~' token
> ./SmartPointer.cc:33: error: syntax error before `~' token
> ./SmartPointer.cc: In destructor `SmartPointer::~SmartPointer()':
> ./SmartPointer.cc:37: error: `__call_SmartPointer' undeclared (first use this
> function)
> ./SmartPointer.cc:37: error: parse error before `~' token
> make[1]: *** [all] Fehler 1
>
> to clarify the problem I have attached the corresponding code:
>
> class SmartPointer
> {
> private:
> void *m_ptr;
> SmartPointer();
> void Create();
> void Delete();
> public:
> SmartPointer(void *);
> ~SmartPointer();
> void *operator -> ();
>
> };
>
> aspect GarbageCollector
> {
> unsigned int m_count;
>
> GarbageCollector() : m_count(0) {}
>
> advice call("% SmartPointer::Create(...)") : after ()
> {
> m_count++;
> }
>
> advice call("% SmartPointer::Delete(...)") : after()
> {
> m_count--;
> }
> };
>
> Have I overlooked a fault?
>
> greetings,
> Sven
> ______________________________________________________________________________
> Zwei Mal Platz 1 mit dem jeweils besten Testergebnis! WEB.DE FreeMail
> und WEB.DE Club bei Stiftung Warentest! http://f.web.de/?mc=021183
>
> _______________________________________________
> aspectc-user mailing list
> aspectc-user at aspectc.org
> http://www.aspectc.org/mailman/listinfo/aspectc-user
the problem was a code generation bug in ac++. The name mangling for
destructor names produced garbage :-(.
Meanwhile I fixed this problem. The fix will be included in the next
version 0.8pre1 in the first half of november.
If it is very urgent, contact me directly.
Yours,
Olaf
More information about the aspectc-user
mailing list