blob: b1677bc203d5d8e9b082832027d4d00aaad54a13 [file] [log] [blame]
Chris Lattnere11700b2003-12-08 06:18:37 +00001struct Evil {
2 void fun ();
3};
4int foo();
5typedef void (Evil::*memfunptr) ();
6static memfunptr jumpTable[] = { &Evil::fun };
7
8void Evil::fun() {
9 (this->*jumpTable[foo()]) ();
10}