Date: Tue, 18 Jul 1995 13:19:51 +0300 (IDT) From: Eli Zaretskii To: Paul Derbyshire Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: Weirdest compile error I've ever seen On Mon, 17 Jul 1995, Paul Derbyshire wrote: > > I went to compile the source for an equation-graphing program (math and > graphics intensive) and got a really strange pair of compile-time error > messages: > > c:\tmp/cc000091:1: parse error before `.' > c:\tmp/cc000091:917: malformatted character constant > > I've never seen it reference a tmp file before... > I checked my code. Line 1 says [snip] > So what gives? Is there some way to glean meaningful information from > these messages? Or has my compiler itself got a serious bug? These messages most probably come from one of the passes invoked by gcc. To be sure which pass it is, add -v to the compilation command line; gcc will then print all the various passes it invokes during the job and you will be able to see what pass emits the message. You should know that the -v output is _very_ voluminous, so it's a good idea to redirect it to a file for further browsing (several ways to do so are described in the DJGPP FAQ list, available as faq102.zip from the same place you get DJGPP). Once you are sure from which pass it is, you should look into those temporary files to identify the line(s) which make it barf. The easiest way is to use some undelete utility (like MS-DOS UNDELETE or Norton UNERASE) to resurrect the temporary (files which are of course deleted after the compiler exits). Another possibility would be to invoke the various compiler passes by hand just as gcc does (it prints the full command line of each pass when given the -v switch), but direct the output to real files which you can then browse. You might have problem with this last approach because of the long command-lines used by gcc which you can't give from the DOS prompt, though. Failing all that, post the code of your source and the command line you use to compile it, and somebody might be able to help you.