<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: class member function pointers in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/class-member-function-pointers/m-p/125494#M217</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I only changed your sample to make it compile, tried it out on CW 4.5 but I did not see any the problems.&lt;BR /&gt;I could imagine that in the process of extracting the real problem you followed the wrong track with the unusual byte ordering of the far function pointers and removed too much to reproduce the bug.&lt;BR /&gt;&lt;BR /&gt;Workaround? Really depends on the actual bug. Without knowing this one, well C style function pointers?&lt;BR /&gt;&lt;BR /&gt;Whatever the problem you have is, I really doubt it is _FCALL, I think you are on the wrong track there.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;
class Foo; //fwd declaration
typedef unsigned int UINT16;
typedef void (Foo::*Callback)(UINT16);
class Foo //declaration proper
{
public:
Foo();
Callback CB;
void somefunction();
void somethingelse();
void func(UINT16);
static Foo foo;
};
Foo Foo::foo;
Foo::Foo()
{
func(7); //dummy call to stop compiler "optimising" function out
}
void Foo::somefunction()
{
CB = &amp;amp;Foo::func; //assign addr
}
void Foo::somethingelse()
{
this-&amp;gt;*CB(7); //call with param ?
}
void Foo::func(UINT16 seven)
{
  while (seven != 7) {  }// wait here if not 7   
}
void main(void) {
  /* put your own code here */
  Foo::foo.somefunction();
  Foo::foo.somethingelse();
  for(;;) {} /* wait forever */
}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Mar 2007 18:48:33 GMT</pubDate>
    <dc:creator>CompilerGuru</dc:creator>
    <dc:date>2007-03-09T18:48:33Z</dc:date>
    <item>
      <title>class member function pointers</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/class-member-function-pointers/m-p/125490#M213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;the following code compiles but i goto the wrong address actually another function instead of assigned &lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-sad.gif"&gt;&lt;IMG alt=":smileysad:" class="emoticon emoticon-smileysad" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-sad.gif" title="Smiley Sad" /&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;this is just a knock up of the actually class but should be the only applicable code?&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Caffeine cant help me anymore what goes on here enlighten me please respected freescale community members.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;*EDIT* something of note... i am using the HC12 micro / CW 4.5&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;whilst debugging i found that the function func() in this case sits at 0xF2BED8 all good the address loaded into the CB variable is 0xBED8F2 (offset 0 , index -1) is this a complier error? notice that LSByte should be MSByte or does it interrupt a pointer differently to a function pointer ?&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;*\EDIT*&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;class Foo; //fwd declaration&lt;/DIV&gt;&lt;DIV&gt;typedef void (Foo::*Callback)(UINT16);&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;class Foo //declaration proper&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;public:&lt;/DIV&gt;&lt;DIV&gt;Callback CB;&lt;/DIV&gt;&lt;DIV&gt;void somefunction();&lt;/DIV&gt;&lt;DIV&gt;void somethingelse();&lt;/DIV&gt;&lt;DIV&gt;void func(UINT16);&lt;/DIV&gt;&lt;DIV&gt;static Foo foo;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Foo Foo::foo;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Foo::Foo&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;func(0); //dummy call to stop compiler "optimising" function out&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;void Foo::somefunction()&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;CB = &amp;amp;Foo::func(); //assign addr&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;void Foo::somethingelse()&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;this-&amp;gt;*CB(7); //call with param ?&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;P&gt;Message Edited by CaffineCoder on &lt;SPAN class="date_text"&gt;2007-03-07&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;10:07 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Message Edited by CaffineCoder on &lt;SPAN class="date_text"&gt;2007-03-07&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;10:16 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;SPAN&gt;Alban Edited message following user request via abuse link&lt;/SPAN&gt;&lt;P&gt;Message Edited by Alban on &lt;SPAN class="date_text"&gt;2007-03-08&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;09:11 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2007 05:47:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/class-member-function-pointers/m-p/125490#M213</guid>
      <dc:creator>CaffineCoder</dc:creator>
      <dc:date>2007-03-08T05:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: class member function pointers</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/class-member-function-pointers/m-p/125491#M214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;More info i am using the -Ml compiler directive (large memory model) and have recompiled the applicable librarys with this directive with no good results&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size="2"&gt;as far a can i tell it is FCALL's fault but how to get around it is beyond me at this time&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;void __far _FCALL(void) {&lt;BR /&gt;&amp;nbsp;__asm {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;LDY&amp;nbsp;&amp;nbsp; 1, SP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; A B C D E F&amp;nbsp;&amp;nbsp;&amp;nbsp; Y = B C&amp;nbsp;&amp;nbsp; ; 2 bytes&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MOVW&amp;nbsp; 3, SP,&amp;nbsp; 1, SP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; A D E D E F&amp;nbsp;&amp;nbsp;&amp;nbsp; Y = B C&amp;nbsp;&amp;nbsp; ; 4 bytes&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MOVB&amp;nbsp; 0, SP,&amp;nbsp; 3, SP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; A D E A E F&amp;nbsp;&amp;nbsp;&amp;nbsp; Y = B C&amp;nbsp;&amp;nbsp; ; 4 bytes&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MOVB&amp;nbsp; 5, SP,&amp;nbsp; 0, SP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; F D E A E F&amp;nbsp;&amp;nbsp;&amp;nbsp; Y = B C&amp;nbsp;&amp;nbsp; ; 4 bytes&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;STY&amp;nbsp;&amp;nbsp; 4, SP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; F D E D B C&amp;nbsp;&amp;nbsp;&amp;nbsp; Y = B C&amp;nbsp;&amp;nbsp; ; 2 bytes&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;; F D E A B C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;16 bytes&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;RTC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; call function pointer&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2007 11:37:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/class-member-function-pointers/m-p/125491#M214</guid>
      <dc:creator>CaffineCoder</dc:creator>
      <dc:date>2007-03-08T11:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: class member function pointers</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/class-member-function-pointers/m-p/125492#M215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;right now I dont have a HC12 compiler here, so I cannot try. But note that HCS12 function pointers are using a special byte ordering, its not just big endian. Instead the byte ordering is implied by the way the HC12 CALL instuction expects the bytes to be in memory indirect calls. So function pointers start with a 16 bit offset (the low part of the address) followed by the page value. As wild guess this is because the CALL instruction takes the PAGE value in addition to the 16 bit address as a simple JSR, so maybe this way the execution of the CALL is simpler.&lt;BR /&gt;I think the value you see looks actually ok for a far function pointer.&lt;BR /&gt;In the end, I guess you should file a service request so the support can properly handle and check the case.&lt;BR /&gt;&lt;BR /&gt;Anyway, I would also usually not recommend to use the large memory model especially for the HCS12/HC12's because of the huge overhead for accessing far data. (For the HCS12X, the overhead is less, but still considerable).&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2007 06:59:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/class-member-function-pointers/m-p/125492#M215</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-03-09T06:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: class member function pointers</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/class-member-function-pointers/m-p/125493#M216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="4"&gt;&lt;FONT color="#000081"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;DIV&gt;&lt;FONT size="1"&gt;Thanks for your reply Daniel,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1"&gt;I am using the &lt;FONT color="#000081"&gt;MC9S12XDP512 chip and have desided on large memory model because data passing etc is easier and i am lazy, real time proformance is not an issue in the system.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1"&gt;cant really wait for a service request fix the deadline approaches fast any ideas on a nasty work around ? maybe an asm solution to call manually replacing FCALL?&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1"&gt;Kind Regards&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1"&gt;CaffineCoder&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2007 09:21:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/class-member-function-pointers/m-p/125493#M216</guid>
      <dc:creator>CaffineCoder</dc:creator>
      <dc:date>2007-03-09T09:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: class member function pointers</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/class-member-function-pointers/m-p/125494#M217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I only changed your sample to make it compile, tried it out on CW 4.5 but I did not see any the problems.&lt;BR /&gt;I could imagine that in the process of extracting the real problem you followed the wrong track with the unusual byte ordering of the far function pointers and removed too much to reproduce the bug.&lt;BR /&gt;&lt;BR /&gt;Workaround? Really depends on the actual bug. Without knowing this one, well C style function pointers?&lt;BR /&gt;&lt;BR /&gt;Whatever the problem you have is, I really doubt it is _FCALL, I think you are on the wrong track there.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;
class Foo; //fwd declaration
typedef unsigned int UINT16;
typedef void (Foo::*Callback)(UINT16);
class Foo //declaration proper
{
public:
Foo();
Callback CB;
void somefunction();
void somethingelse();
void func(UINT16);
static Foo foo;
};
Foo Foo::foo;
Foo::Foo()
{
func(7); //dummy call to stop compiler "optimising" function out
}
void Foo::somefunction()
{
CB = &amp;amp;Foo::func; //assign addr
}
void Foo::somethingelse()
{
this-&amp;gt;*CB(7); //call with param ?
}
void Foo::func(UINT16 seven)
{
  while (seven != 7) {  }// wait here if not 7   
}
void main(void) {
  /* put your own code here */
  Foo::foo.somefunction();
  Foo::foo.somethingelse();
  for(;;) {} /* wait forever */
}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2007 18:48:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/class-member-function-pointers/m-p/125494#M217</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-03-09T18:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: class member function pointers</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/class-member-function-pointers/m-p/125495#M218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;i hate to disagree with a Guru but i am going to anyway...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;after taking all the callback funtions out of the class and making the callback var static it works perfectly, so i still believe that there is a problem with class member function pointers.. i did a test with other compilers and the operated perfectly with both sets of code member function pointers and global.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;maybe you didnt experience the problem because of compiler settings differences?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 04:24:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/class-member-function-pointers/m-p/125495#M218</guid>
      <dc:creator>CaffineCoder</dc:creator>
      <dc:date>2007-03-13T04:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: class member function pointers</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/class-member-function-pointers/m-p/125496#M219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;CaffineCoder wrote:&lt;BR /&gt;&lt;DIV&gt;i hate to disagree with a Guru but i am going to anyway...&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;Well, do we disagree after all? My statement was that for me the bug did not show up with the code I did show. To reproduce, create a project with the wizard for the XDP512, select C++, Large memory model and past the code in the previous mail into main.cpp.&lt;BR /&gt;With this setup, the code behaves properly. I was using the options "-CpuHCS12X -D__NO_FLOAT__ -Ml".&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;after taking all the callback funtions out of the class and making the callback var static it works perfectly,&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;Not sure I understand what you did. Did you make the field CB a static instance, keeping it a pointer to member, or did change the type of CB to a plain C function pointer taking an additional Foo argument?&lt;BR /&gt;Anyway, does not really matter (for me) as this is just a workaround for you to meet the deadline. In the end, we have to isolate and fix the bug and after this changes, the bug does not show up anymore.&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;so i still believe that there is a problem with class member function pointers.&lt;BR /&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;Yes, it looks like. Did you file a service request? I would propose to do so and provide a complete compilable sample, including the mcp, the elf file which fails and a description so the support understands what is supposed to happen, and what does happen.&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;i did a test with other compilers and the operated perfectly with both sets of code member function pointers and global.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;maybe you didnt experience the problem because of compiler settings differences?&lt;/DIV&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 19:35:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/class-member-function-pointers/m-p/125496#M219</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-03-13T19:35:33Z</dc:date>
    </item>
  </channel>
</rss>

