Date: Sun, 30 Aug 1998 17:28:37 +0300 (IDT) From: Eli Zaretskii To: Nate Eldredge cc: Endlisnis , djgpp AT delorie DOT com Subject: Re: Display question... In-Reply-To: <35E733E7.BE5A1DB7@cartsys.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Fri, 28 Aug 1998, Nate Eldredge wrote: > It detects it quite well, but doesn't always explain it well. I once > had a bug involving a missing parenthesis in a complicated macro. GCC > just said "Parse error", which didn't help me much. In desperation I > submitted the code to Turbo C, got a "Missing )" message, and had it > fixed quickly. But that is less important. "Parse error" means "Syntax error", that's all. The degree to which a given parser can give you specific diagnostics on syntax errors depends on how that parser was designed. It is sheer luck to get a diagnostics such as "Missing )"; a sufficiently-complexx expression that uses unbalanced parentheses will probably break that. Many syntax errors leave the parser in an error state from which they cannot second-guess what was the cause of the problem without a prolonged analysis that would make the parse painfully slow. On the other hand, you could always ask: if Turbo C is so smart, why doesn't it just add that paren and compile the source anyway?