Return to BSD News archive
Newsgroups: comp.os.386bsd.questions Path: sserve!newshost.anu.edu.au!munnari.oz.au!ihnp4.ucsd.edu!dog.ee.lbl.gov!agate!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!ncar!csn!boulder.parcplace.com!imp From: imp@boulder.parcplace.com (Warner Losh) Subject: Re: WP for Linux, BSD? Message-ID: <CMMz07.5vu@boulder.parcplace.com> Sender: news@boulder.parcplace.com Organization: ParcPlace Boulder References: <1994Mar9.082547.1022@news.csuohio.edu> <CMMHqG.3L9@boulder.parcplace.com> <2m0ctg$hnf@mojo.eng.umd.edu> Date: Mon, 14 Mar 1994 03:57:43 GMT Lines: 39 In article <2m0ctg$hnf@mojo.eng.umd.edu> chuckr@glue.umd.edu (Charles B. Robey) writes: >Could you expand on that comment, re: g++ brain damage? What's the >known problem, what do you know about it? Pointers to member function can't be cast at all. Since callbacks in OI (and other toolkits) use this feature heavily, it makes g++ 2.5.8 useless for compiling and running with OI. For example: class C2 { public: void mf1(C2 *, void *); }; typedef void (C2::*mfp3(C2 *, void *)); void f1() { mfp3 mf3; mf3=(mfp3)&C2::mf1; // Legal } Produces an error at the "Legal" comment. I have a patch for this case, but more complicated stuff tends to give the compiler fits as well. There are also problems with cpp in this version when OI is installed in /usr/include because it assumes they must be "C" files and surrounds them with extern "C". This is bad, needless to say. It is easy to patch by defining -DNO_IMPLICIT_EXTERN_C when building gcc. So maybe "brain damaged" was a little strong, but there are several problems with the compiler and it should best be avoided until 2.6.0 comes out. For normal 'C' programs, I haven't had any problems with the 2.5.8 compiler. As it is, I can't build OI on linux for OI's upcoming release due to these problems. Warner -- Warner Losh imp@boulder.parcplace.COM ParcPlace Boulder "... but I can't promote you to "Prima Donna" unless you demonstrate a few more serious personality disorders"