From mboxrd@z Thu Jan 1 00:00:00 1970 From: hjl@lucon.org (H.J. Lu) To: egcs@cygnus.com Cc: egcs-bugs@cygnus.com Subject: Re: Bug in egcs? Date: Mon, 15 Dec 1997 13:47:00 -0000 Message-id: References: <52lnxmz6px.fsf@ace.funcom.com> X-SW-Source: 1997-12/msg00860.html > > While porting some code from Visual C++ 5.0 to egcs (I've tried both > 1.0 and the 971207 release) I came across a problem compiling some of > the code. I have been able to narrow it down to the 30 lines attached > to this mail. The relevant error message I get while compiling if I > _remove_ the comment from the SomeClass_t constructor is: > > test.cpp:13: sorry, not implemented: `try_catch_expr' not supported by > dump_expr > > If the constructor is commented out, everything works fine and > dandy. On Microsoft Visual C++ a similar piece of code (which emits > the same error on the same construction under egcs on linux) compiles > and runs without any problems. > > Regardless, the error message does not really give me much help in > figuring this one out. Is there anybody out there with a clue? > > Thanks in advance.. > > Marius > > -----8< Code snippet follows -----8<-----8<-----8<-----8<-----8< > #include > > class SomeClass_t { > public: > // SomeClass_t () : x (11) {} > protected: > float x; > }; > > class DynamicOnly_t { > public: > static DynamicOnly_t* create (const char* name = "UNDEF", > const SomeClass_t& somec = *(new SomeClass_t ())) { > return new DynamicOnly_t (name, somec); > } > DynamicOnly_t (const char* name, const SomeClass_t& somec) : > m_somec (somec) { > strncpy (m_Name, name, sizeof (m_Name)); > } > private: > SomeClass_t m_somec; > char m_Name[255]; > }; > > int main (int argc, char* argv[]) { > DynamicOnly_t* ptr = DynamicOnly_t::create (); > return 0; > } > > // compiled with 'gcc test.cpp' where gcc = egcs 1.0 and 971207 > I have no problem to compile it with egcs 1.0 on Linux/x86. -- H.J. Lu (hjl@gnu.org)