AnsweredAssumed Answered

complier`s problem with the option of -char-size-8

Question asked by Derek on Aug 31, 2009
Latest reply on Sep 23, 2009 by CraigG

Hello, the complier exist the bug when the option of "-char-size-8" is available.

 

processor : TS201

tool :  VisualDSP++ 4.5 (product:4.5.0.0 IDDE: 7.0.0.0, build: may 4, 2006)

 

example code:

 

char *pText = "abcd";  /* pText = 0x0008597C */

char *pCur = pText;   /* pCur = 0x0008597C */

pCur++;                   /* pCur = 0x4008597C */

pCur++;                   /* pCur = 0x8008597C */

int nLen = pCur - pText;    /* nLen = 80000000 */

 

the expected result of nLen is 2, but......????

Outcomes