Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5340

CVI 2010 compiler crash

$
0
0

This short piece of code below causes compiler crash in CVI 2010 - in CVI9.0 it works fine.

 

Thanks for help.

 

jirjan

 

 

/* Compiler Crash example, CVI 2010 - v10.0.0 */

static void fctDummy1(void) {};
static void fctDummy2(void) {};

typedef struct tagMyStruct
{
  void (*DummyFunction1)  ( void );
  void (*DummyFunction2)  ( void );

} tMyStruct;

         tMyStruct MyFctStruct         = {fctDummy1, fctDummy2};
const tMyStruct MyConstFctStruct = {fctDummy1, fctDummy2};


void MyTest(void)
{

   MyFctStruct.DummyFunction1();
   MyFctStruct.DummyFunction2();
   /* this line doesn't cause the compiler crash...!!*/
   MyConstFctStruct.DummyFunction1();
   /* BUT next line caused the compiler crash...!!*/
   MyConstFctStruct.DummyFunction2();
}


Viewing all articles
Browse latest Browse all 5340

Trending Articles