From: Jason Green Newsgroups: comp.os.msdos.djgpp Subject: Re: Possible Compiler Bug Date: Thu, 24 Feb 2000 20:22:45 +0000 Organization: Customer of Planet Online Lines: 27 Message-ID: References: <38B57379 DOT 817FFBE4 AT netcom DOT ca> NNTP-Posting-Host: modem-26.cesium.dialup.pol.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news7.svr.pol.co.uk 951424293 28332 62.136.46.26 (24 Feb 2000 20:31:33 GMT) NNTP-Posting-Date: 24 Feb 2000 20:31:33 GMT X-Complaints-To: abuse AT theplanet DOT net X-Newsreader: Forte Agent 1.7/32.534 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com MM wrote: > The file I've attached causes djgpp to kill the compiler and tell me to > submit a full bug report. I would do so, but first I want to make sure > this happens to others as well. If you could please take a look at the > code and tell me what I'm doing wrong or if it shouldn't be done like > that at all to begin with I'd greatly appreciate it. > Thanks, If gcc says to submit a bug report then that is by itself fair confirmation that you have found a bug. ;-/ If you would like confirmation from others then please give the exact compile line you use, also say what version of gcc. I have tried to replicate the problem, but all I get are compiler errors about the code. The is with gcc 2.95.2, maybe you have an older version and the bug is already fixed? As to whether what you are doing is ok or not, well I get compile errors so that should tell you something ;-) I don't understand what you are trying to do, but I would point out that in C++ there are better ways of doing some things that would require function pointers in C. Maybe you want to investigate derived classes, function overloading and virtual functions? Of course, whether or not the code is legal, and whether or not the style is Good, the compiler should not crash.