Hi Roey,
(BTW, my apologies for not quoting from the actual posting I'm responding
to, but I accidentally deleted the posting and don't have it around any
more)
I looked at the update to your problem, in which you indicated that you
could not set breakpoints at the if-statement when debugging. From the
information provided, and from what I tried out here, it looks like you may
be debugging with optimizations on. The breakpoint dashes will not appear
with optimizations on since the code for the if-statement has been
optimized. For debugging, you may want to debug using optimizations level 0.
BTW, this is a good idea to do for most debug targets. Can you take a look
and see if this is what is happening? If so, then changing the opts level
should fix the problem.
Rgds,
Jun-Kiat Lam
Metrowerks Technical Support
> At 05:53 PM 12/20/1999 -0600, you wrote:
> >Hi,
> >
> >We have run across a very disturbing CodeWarrior 6 bug: there are cases
> >where no code is generated for what looks like valid C source.
> >Specifically, an entire if-else statement is ignored by CW6. Has anyone
> >else run across anything like this? I searched through the FAQ,
> >knowledge base and mailing list archives but have not seen any
> >reference to similar problems.
> >
> >Below is an example function that has failed under several test
> >configurations. If you have difficulty reproducing the problem, email
> >me and I can send you a project that shows off the bug.
> >
> >Thanks,
> >
> >Roey Ben-Yoseph <[EMAIL PROTECTED]>
> >Globalware Computing
> >
> >++++++++++++++++++++++++++++++++++++++++
> >
> >static Word BuildTextLine(CharPtr dstStr, CharPtr srcStr)
> >{
> > Word dstStrLen;
> > Word srcStrLen;
> > Word copyLen;
> >
> > dstStrLen = StrLen(dstStr);
> > srcStrLen = StrLen(srcStr);
> >
> > if(dstStrLen >= 37)
> > return dstStrLen;
> >
> >//// No code is generated for this source ////
> > if( (dstStrLen + srcStrLen) <= 37)
> > copyLen = srcStrLen;
> > else
> > copyLen = (srcStrLen - ( (dstStrLen + srcStrLen) - 37));
> >//// No code is generated for this source ////
> >
> > return copyLen;
> >}
> >
>
> ---
> Christian Vandendorpe ([EMAIL PROTECTED])
> http://www.zorglub.com
>