[Coco] Microware C question/problem

Robert Gault robert.gault at worldnet.att.net
Fri Dec 30 20:33:29 EST 2005

I am trying to test a library function in Microware C. A very strange 
bug was found for which I can't find a source. Here is the library call 
that causes the problem. Ignore whether the C syntax is correct but just 
look at the resulting asm code.

n = strrchr(*file, "/" || "\\");

Partial output from c.pass2

  lead _3,pcr
  lbne _6
  lead _4,pcr

Clearly this is not legal code because of the lead. If the || "\\" is 
removed from the source, the lead goes away.

What is causing this bad asm code? It seems to be a c.pass2 problem but 
I've compiled some very large C programs and never seen anything like 
this before.

More information about the Coco mailing list