Path: utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!YAHI.STANFORD.EDU!mdt From: mdt@YAHI.STANFORD.EDU (Michael Tiemann) Newsgroups: gnu.g++.bug Subject: _main (or other functions) undefined? Message-ID: <8902211656.AA01377@yahi.Stanford.EDU> Date: 21 Feb 89 16:56:50 GMT Sender: daemon@tut.cis.ohio-state.edu Reply-To: tiemann@lurch.stanford.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 13 A fwe times people have reported that GNU C++ will compile their files, and make it to the link stage, only to have _main undefined. I now know the cause for this problem: bison is out of date. At least one old version of bison would return an error status (silently) when it encountered a syntax error. GNU C++ does not check the return status of yyparse, instead it relies on the parser to detect and record all relavent errors. Since the error is not recorded, GNU C++ assumes that evrything is ok, and hence does not return an error status. The result is partially compiled programs. Getting the latest version of bison fixes this problem. Michael