[Coco] Microware C question/problem

Gene Heskett gene.heskett at verizon.net
Fri Dec 30 21:25:05 EST 2005


On Friday 30 December 2005 20:33, Robert Gault wrote:
>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

And it isn't, to me...

> but just look at the resulting asm code.
>
>n = strrchr(*file, "/" || "\\");
>
>Partial output from c.pass2
>
>  lead _3,pcr
>  lbne _6
>_7
>  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.

An excellent question Robert as I've looked at many megabytes of 
c.pass2's output without ever seeing anything like that, but in my own 
codeing efforts, I don't believe I ever used such a construction with 
those exact quoted strings either.  Could it not be handled with a 
pair of case statements and get the end result desired?

I'll be very interested in what you find.

-- 
Cheers, Gene
People having trouble with vz bouncing email to me should add the word
'online' between the 'verizon', and the dot which bypasses vz's
stupid bounce rules.  I do use spamassassin too. :-)
Yahoo.com and AOL/TW attorneys please note, additions to the above
message by Gene Heskett are:
Copyright 2005 by Maurice Eugene Heskett, all rights reserved.



More information about the Coco mailing list