🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #28406

Mark Johnson C compiler ('bug')

#28406
From: Lean L. Loh
Date: Thu, 24 Sep 1987 16:52
23 lines
1777 bytes
  I downloaded the MJ's C compiler from GEnie about 2 weeks ago, and have
played with it a little.  Here a little 'bug' that I discovered.
  The first thing I tested was a little program to do basic i/o.  I had a
scanf( "%d", &num );  statement, and when I compile the program, it always
says "getc undefined".  So I looked at the lib.c file, and found that
scanf calls a routine (dopf or something) which in turn calls getc.  But
all 3 routines were defined properly. So I tested getc by itself, and didn't
have problem with it.
  So I went back to the lib.c file, and moved the getc routine to a spot
after the 'dopf'  (i.e. the routine called by scanf, which in turn calls
getc), re-compile it into lib.a, and walla !!! problem solved.
  Since C allows forward or backward reference of function name, I have
no idea why that solved the problem.  Anyway, those who downloaded the one
that was just posted might want to do the same thing.  I've checked this 
one (the one posted to the net), and it's exactly the same as the one I
got from GEnie.
  I think Mark Johnson has done a very good job. Very many thanks, Mark.
Now if only it suports Floats ........
-- 
CSNET: lean@sbcs.csnet
ARPA: lean%suny-sb.csnet@csnet-relay.arpa
UUCP: {allegra, hocsd, philabs, ogcvax}!sbcs!lean
Technical Details
Message-ID: <611@sbcs.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!linus!philabs!sbcs!lean

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!linus!philabs!sbcs!lean
From: lean@sbcs.UUCP (Lean L. Loh)
Newsgroups: comp.sys.atari.st
Subject: Mark Johnson C compiler ('bug')
Message-ID: <611@sbcs.UUCP>
Date: Thu, 24-Sep-87 12:52:22 EDT
Article-I.D.: sbcs.611
Posted: Thu Sep 24 12:52:22 1987
Date-Received: Sun, 27-Sep-87 12:00:19 EDT
Distribution: comp
Organization: Computer Science Dept, SUNY@Stony Brook
Lines: 23