Subj : Internal compiler error on piece of (simple) C++ code To : borland.public.cpp.borlandcpp From : Ronald Landheer-Cieslak Date : Mon Sep 15 2003 02:07 pm Hello all, I am currently in the process of porting a (big) piece of code to BCC551. The same code compiles & works without problems on various other compilers and systems (gcc w/ Linux, FreeBSD, MinGW and Cygwin; MSVC on W32 proper). When I try to compile one of my .cpp files with BCC551 (or BCB5 or BCB6) I get an internal compiler error at the end of the function. The function makes a Xerces-C SAX parser and a memory buffer - the latter of which lives in a smart pointer class - parses and returns. The code is inline below. The messages I get are: Fatal F1004 ..\..\libCMH\CMH_XMLparser-parse.hpp 34: Internal compiler error at 0x45e84a with base 0x400000 in function CMH_XMLparser::parse() Fatal F1004 ..\..\libCMH\CMH_XMLparser-parse.hpp 34: Internal compiler error in function CMH_XMLparser::parse() (in BCB5 and BCB6, I get messages meaning the same thing, but in French) Here's the code: bool CMH_XMLparser::parse(void) { TRACE("CMH_XMLparser(0x%.8X)::parse()", (int)this); CMH_SAXhandler handler(this); SAX2XMLReader * parser = XMLReaderFactory::createXMLReader(); cmh_autocount_ptr inputBuffer; // FTTB, we don't validate yet parser->setFeature(XMLUni::fgSAX2CoreValidation, false); // nor do we use name spaces parser->setFeature(XMLUni::fgSAX2CoreNameSpaces, false); parser->setFeature(XMLUni::fgSAX2CoreNameSpacePrefixes, false); // or schemas parser->setFeature(XMLUni::fgXercesSchema, false); parser->setFeature(XMLUni::fgXercesSchemaFullChecking, false); // set the handlers parser->setContentHandler(&handler); parser->setErrorHandler(&handler); inputBuffer = new MemBufInputSource( (const XMLByte*)theXMLdocumentContents.c_str(), theXMLdocumentContents.length(), fake_sysID, false ); parser->parse(*inputBuffer); return(handler.num_errors() == 0); } The function is part of a class but lives in its own file (CMH_XMLparser-parse.hpp, included by CMH_XMLparser.cpp). Other than being included by the CPP file, it also contains an include directive of its own: #include "CMH_SAXhandler.h" My questions are: * is there any way to nail down the error to, say, the preprocessor, the assembler, the compiler itself, ... ? * is there anything really supicious in the code or in the setting (code in separate file) that BCC might not be able to handle? * is there any way to get the compiler (driver) to save any intermediate files (as with gcc -save-temps)? Any suggestions, pointers and solutions(!) would be very welcome. Thanks, Ronald Landheer-Cieslak (rlc) -- Jail: Just Another Interpreted Language Just: Jail Uses Silly Terms Join the discussion on the definition of this language at jail-ust-lang@lists.sourceforge.net http://jail-ust.sourceforge.net (send mail to jail-ust-lang-subscribe@lists.sourceforge.net) .