[aspectc-user] compile error
Matthias Urban
matthias.urban at pure-systems.com
Tue Oct 21 10:43:02 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
I've tested your sample code with ac++ v0.7.1, v0.7.2, and v0.8
(internal version ;) but I wasn't able to reproduce this error. Maybe
you should send the complete example, if possible (including the
generated code!!!).
Matthias
--
Matthias Urban Phone: +49-391-544569-32
pure-systems GmbH Fax: +49-391-544569-90
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3096 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20031021/ce40b775/attachment.bin>
More information about the aspectc-user
mailing list