--- layout: fc_discuss_archives title: Message 6 from Frama-C-discuss on December 2012 ---
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] Following execution through function pointer



I apologize... there was a typo in the preprocessor's output...

it should be...

int main() {

        void (*myFunc)();

        myFunc = &func1;

        if (myFunc == &func1) { func1();} else
        if (myFunc == &func2) { func2();} else
        { printf("unhappiness\n"); exit(0); }


        myFunc = &func2;

        if (myFunc == &func1) { func1();} else
        if (myFunc == &func2) { func2();} else
        { printf("unhappiness\n"); exit(0); }
        
}