[aspectc-user] pointer bug?
shyam sunder
sigshyam at yahoo.com
Sun Feb 1 19:35:47 CET 2004
Pointers seems all messed up. Have a look:
main.acc:
#include <cstring>
#include <iostream>
void foo(void* x)
{
cout << "in foo: " << x << endl;
}
int main()
{
char x[]="asdf";
cout << "in main: " << (void*)x << endl;
foo(x);
}
------------------------------------------------
Test.ah:
#include <iostream>
aspect Test
{
public:
pointcut method1() = call("% foo(...)");
advice method1() : before()
{
cout << "in aspect: " << (tjp->arg(0)) << endl;
}
};
-----------------------------------------------
ac++ -p. -c main.acc -o main.cpp
g++2 main.cpp
output:
in main: 0xbffff7d0
in aspect: 0xbffff7b0
in foo: 0xbffff7d0
-----------------------------------------------
Whats wrong with this picture?
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
More information about the aspectc-user
mailing list