Frama-C-discuss mailing list archives

This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: [Frama-c-discuss] Following execution through function pointer
  • From: dchapiesky2 at gmail.com (daniel)
  • Date: Thu, 13 Dec 2012 22:36:32 -0500

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); }
        
}