[aspectc-user] Missing forward declaration after weaving.

Guilherme . guibufolo at gmail.com
Fri Apr 15 13:47:11 CEST 2011


Hi!

Sorry to be bothering this mailing list so much.

I have complied this simple aspect:

#ifndef __SIMPLE_ASPECT_AH__
#define __SIMPLE_ASPECT_AH__

aspect tiresome {

	advice execution("% ...::%(...)") : before()
	{
		int i = 0;
	}

};

#endif // __SIMPLE_ASPECT_AH__

Into a source with this command line:

ag++ -k -v9 --c_compiler i386-elf-gcc --keep_woven --repository
rep.xml -p /opt/sigubufo/branch/aspects/  -a
/opt/sigubufo/branch/aspects/simple_aspect.ah -p
/opt/sigubufo/branch/tools/../ecos_hg/packages/devs/wallclock/dallas/ds12887/current/src/
 -c  -I/opt/sigubufo/branch/ecos_apps/hello_world/ecos/install/include
-I/opt/sigubufo/branch/tools/../ecos_hg/packages/devs/wallclock/dallas/ds12887/current
-I/opt/sigubufo/branch/tools/../ecos_hg/packages/devs/wallclock/dallas/ds12887/current/src
-I/opt/sigubufo/branch/tools/../ecos_hg/packages/devs/wallclock/dallas/ds12887/current/tests
-I. -I/opt/sigubufo/branch/tools/../ecos_hg/packages/devs/wallclock/dallas/ds12887/current/src/
-finline-limit=7000 -Wall -Wpointer-arith  -Wundef
-Woverloaded-virtual -Wno-write-strings -g -O2 -ffunction-sections
-fdata-sections -fno-rtti -fno-exceptions -D_KERNEL
-Wp,-MD,src/ds12887.tmp -o src/devs_wallclock_dallas_ds12887_ds12887.o
/opt/sigubufo/branch/tools/../ecos_hg/packages/devs/wallclock/dallas/ds12887/current/src/ds12887.cxx

And i get follwing errors:

src/ds12887.acc: In member function ‘cyg_uint32
Cyg_WallClock::get_hw_seconds()’:
src/ds12887.acc:409: error: ‘class Cyg_WallClock’ has no member named
‘__exec_old_get_hw_seconds’
src/ds12887.acc: At global scope:
src/ds12887.acc:413: error: no ‘cyg_uint32
Cyg_WallClock::__exec_old_get_hw_seconds()’ member function declared
in class ‘Cyg_WallClock’
src/ds12887.acc: In member function ‘void
Cyg_WallClock::set_hw_seconds(cyg_uint32)’:
src/ds12887.acc:433: error: ‘class Cyg_WallClock’ has no member named
‘__exec_old_set_hw_seconds’
src/ds12887.acc: At global scope:
src/ds12887.acc:436: error: no ‘void
Cyg_WallClock::__exec_old_set_hw_seconds(cyg_uint32)’ member function
declared in class ‘Cyg_WallClock’
src/ds12887.acc: In member function ‘void Cyg_WallClock::init_hw_seconds()’:
src/ds12887.acc:454: error: ‘class Cyg_WallClock’ has no member named
‘__exec_old_init_hw_seconds’
src/ds12887.acc: At global scope:
src/ds12887.acc:457: error: no ‘void
Cyg_WallClock::__exec_old_init_hw_seconds()’ member function declared
in class ‘Cyg_WallClock’
/opt/sigubufo/branch/aspects/simple_aspect.ah: In member function
‘void tiresome::__a0_before()’:
/opt/sigubufo/branch/aspects/simple_aspect.ah:8: warning: unused variable ‘i’

Now if i look into src/ds12887.acc @ line 409 i see:

// Returns the number of seconds elapsed since 1970-01-01 00:00:00.
402 cyg_uint32
403 Cyg_WallClock::get_hw_seconds(void)
404
405 #line 406 "src/ds12887.acc"
406 {
407   ::cyg_uint32 result;
408   AC::invoke_tiresome_tiresome_a0_before ();
409     result = this->__exec_old_get_hw_seconds();
410   return (::cyg_uint32 &)result;
411
412 }
413 __attribute__((always_inline)) inline ::cyg_uint32
Cyg_WallClock::__exec_old_get_hw_seconds()
414 #line 261 "/opt/sigubufo/branch/tools/../ecos_hg/packages/devs/wallclock/dallas/ds12887/current/src/ds12887.cxx"
415 {
416     cyg_uint32 year, month, mday, hour, minute, second;
417
418     get_ds_hwclock(&year, &month, &mday, &hour, &minute, &second);
419
420     cyg_uint32 now = _simple_mktime(year, month, mday, hour,
minute, second);
421     return now;
422 }

The functions are there but what is missing is the forward declaration.

Is there a known bug relevant to this?

Greetings,
Guilherme




More information about the aspectc-user mailing list