From: Donn Miller Newsgroups: comp.os.msdos.djgpp Subject: Re: Parse errors Date: Fri, 23 Oct 1998 02:08:41 +0000 Organization: Bell Atlantic Internet Solutions Lines: 47 Message-ID: References: <4af57b8d DOT 36227988 AT aol DOT com> <703q7p$bus$1 AT nnrp1 DOT dejanews DOT com> NNTP-Posting-Host: client201-122-35.bellatlantic.net Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Sender: dmm125 AT localhost In-Reply-To: <703q7p$bus$1@nnrp1.dejanews.com> To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Thu, 15 Oct 1998 silkwodj AT my-dejanews DOT com wrote: > George, this is the kind of frustration I suggested I may have to post as > well. > > > I've been progressing pretty well, writing Nasm code and linking with DJGPP. > I worked on a modestly sizeable Borland conversion project. After marching > through a huge page of compiler error messages(newbie dumb stuff), and > resolving one at a time I finally get down to a compiler execution line and > output that looks like this: > > C:\Work\pcx >gcc pcxview3.cc pcx.o myscrn1.o myscrn2.cc -o pcxview.exe > pcxview3.cc:71: parse error at end of input. > > Now my pcxview3.cc file has only 70 lines in it! What's also baffling is the > file pcx.o was compiled a couple of weeks ago, but now I can't compile it > again. I get the same kind of error message for the end of its 276 lines of > code. > > I have assumed I'm missing a squiggly bracket or a semicolon or something, > but I'm going up a wall! I've brought the files into several editors and > made sure there is nothing like a non-printing character at the end. I've > flipped the order of functions in the source to make sure it is not specific > to one function at the end. The parse error always appears at one line past > the end of my code. It could mean that you've got a piece of hardware like memory or cache gone bad. But with bad memory, you get parse errors in random places each time. Like if the compiler tells you you forgot a semicolon somewhere, and there is one, you can be sure it's bad memory. The reason bad memory causes parse errors: first, your source code is read into memory. Then, when reading one char out from a bad memory location, it will look like a random or null char instead of what it really is. I would check the memory by booting up under command line only mode, and see what HIMEM.SYS tells you. But don't go by the memory check at the beginning (the BIOS memory check). My BIOS rolled up the memory 4 times each time I reset my machine and said all was OK. However, when compiling I got parse errors for no reason and HIMEM.SYS told me I had bad memory at this one location. I replaced the 32M ram with a fresh, all new 64M ram and no more parse errors or HIMEM boot-time errors. Donn