[Coco] MW-C Cross compiler bug - Solved
Luis Antoniosi (CoCoDemus)
retrocanada76 at gmail.com
Fri Mar 7 08:16:50 EST 2014
http://www.colorcomputerarchive.com/coco/Programming/OS-9%206809%20C%20Crossc-Compiler%20Sources/
On Fri, Mar 7, 2014 at 1:46 AM, Kip Koon <computerdoc at sc.rr.com> wrote:
> Hi Luis!
> A Microware C Cross Compiler?!? I'd love to get a copy of this!
> Kip
>
> -----Original Message-----
> From: coco-bounces at maltedmedia.com [mailto:coco-bounces at maltedmedia.com] On
> Behalf Of Luis Antoniosi (CoCoDemus)
> Sent: Thursday, March 06, 2014 11:43 PM
> To: CoCoList for Color Computer Enthusiasts
> Subject: [Coco] MW-C Cross compiler bug - Solved
>
> Hi all,
>
> I'm using the C cross compiler on linux and I found a strange and
> annoying bug all the time it kinda messed up with the variable names
> and I had to put (int) and other parenthesis in order to avoid those
> bugs. The they appeared completely in an arbitrary fashion with no
> defined pattern so far. I had to type a line and try to compile...
>
> I was about to ditch this freaking compiler when I found the culprit:
> the coprep doesn't like any indentation at all. The solution was
> adding a small preprocessor before the C preprocessor.
>
> So you change the cc file into:
>
> echo "Preprocess.."
> sed 's/^[ \t]*//' $1 > $name.ns
> coprep $name.ns > $name.m
> [ $? = 0 ] || exit 1
> rm $name.ns
>
> The sed 's/^[ \t]*//' $1 > $name.ns will strip all leading spaces and
> tabs and the coprep will happily preprocess your C code.
>
> Now I can keep coding in peace...
>
> --
> Long live the CoCo
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
--
Long live the CoCo
More information about the Coco
mailing list