From: Jason Green Newsgroups: comp.os.msdos.djgpp Subject: Re: Windows ME and DJGPP Date: Mon, 29 Jan 2001 00:48:09 +0000 Organization: Customer of Energis Squared Lines: 36 Message-ID: References: <3A6CB71F DOT 8B4E86C9 AT phekda DOT freeserve DOT co DOT uk> <94k3dc$lf9$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <94pm3k$1qf$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <94rrk4$sro$1 AT antares DOT lu DOT erisoft DOT se> <9003-Sat27Jan2001104054+0200-eliz AT is DOT elta DOT co DOT il> NNTP-Posting-Host: modem-34.titanium.dialup.pol.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: newsg1.svr.pol.co.uk 980729300 16784 62.136.21.34 (29 Jan 2001 00:48:20 GMT) NNTP-Posting-Date: 29 Jan 2001 00:48:20 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 > > It compiles cleanly like this: > > > > int main(void) > > { > > char *p = 0; > > *p = 'X'; > > > > return 0; > > } > > > And I do not think clean code can contain a line which can produce many > > > errors that result in SIGSEGV but gives no hint about it. > > > > Try stepping up the warnings you have enabled. I don't think it's > > possible for gcc to flag bugs like in the above example but it might > > show up some other problem with your code. > > Perhaps it can flag this one when optimizing. Not when I tried, although lint might catch this. One reason gcc misses it may be that all-bits-zero pointer is valid on some platforms (I think). Feel free to suggest this to the gcc maintainers though. My point though was not regarding the example code. I am merely suggesting to up the warning level to something more extreme when compiling the problem code, in order to see how clean it really is and perhaps weed out a bug. I should add that of course I don't know what warnings you are using (and so what you mean by clean code) - maybe you already did this. I'm kinda loosing the thread here, are you saying you only get SIGSEGV under Windows ME? Did you try your program under real-mode DOS (from boot floppy)?