Xref: news2.mv.net comp.os.msdos.djgpp:7300 Newsgroups: comp.os.msdos.djgpp Subject: Internal compiler error 308. Message-ID: <01bb8a30$ed69ae50$e62e4cc3@roco> From: "Paco Ferre" Date: 14 Aug 1996 22:35:23 GMT Organization: Universidad Autonoma de Madrid NNTP-Posting-Host: ppp2230.lander.es Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Lines: 51 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp This is a simple program which causes two kind of errors. You will see what i am trying to do: --------------------------------- from #include typedef char *(*getfuncptr)(int); class aClass { public: char* Func(int pos); }; void (aClass::*pmfnFunc)() = &aClass::Func; char* aClass::Func(int pos) { static char *list[] = { "\nFirst", "\nSecond" }; return list[pos]; } int Second(void *f) { puts((*(getfuncptr)f)(1)); } void main(void) { class aClass MiClass; // This causes a General Protection fault, without errors reported by the compiler. // This was the first thing i tried. I don't know if this is the good manner. Second((void*) &aClass::Func); // And this causes an Internal Compiler Error 308 Second((void*) (MiClass.*pmfnFunc)); } --------------------------------- to Thanks for any idea. --------------------------------- Paco Ferre Universidad Autonoma de Madrid (Spain) mailto:pferre AT strogoff DOT adi DOT uam DOT es ---------------------------------