Xref: news-dnh.mv.net comp.os.msdos.djgpp:4228 Path: news-dnh.mv.net!mv!news.sprintlink.net!cyberspace.com!imci2!newsfeed.internetmci.com!xmission!charnel.ecst.csuchico.edu!csusac!csus.edu!news.ucdavis.edu!wheel!elric From: elric AT wheel DOT ucdavis DOT edu (Jeffrey Taylor) Newsgroups: comp.os.msdos.djgpp Subject: Re: (none) Date: 9 Jan 1996 20:07:39 GMT Organization: Davis Community Network - Davis, California, USA Lines: 39 Message-ID: <4cuhub$16o@mark.ucdavis.edu> References: NNTP-Posting-Host: wheel.dcn.davis.ca.us To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp dunder (dunder AT nyongwa DOT montreal DOT qc DOT ca) wrote: : We are currently making a relatively big program in C++. We wrote it in : Turbo C++. We arranged it so it could be compiled within GCC (dj's) (ie : arranging the random() pow(long, long) and itoa() [wich we had to redo : ;)] but it seems that GCC doesn't support it. It compiles well, without : warnings but the executable doesn't work (its NOT a renamed COFF file ;)) : It bugs 'at start'. Go32 v1.11.maint4 reports: : : Segment violation in pointer 0x00000000 at d8:de81 : eax=00020008 ebx=0001d110 ecx=00000000 edx=00000000 esi=00000000 edi=00000000 : ebp=7ffffc88 esp=7ffffc4c cs=d8 ds=48 es=48 fs=48 gs=48 gs38 ss=48 : cr2=00000000 : Call frame traceback EIPs: : 0x0000de81 : 0x00003d45 : : It works fine compiled with TC... Is this error sent by a particular bug : en DJGPP or by some 'TC supported' functions or syntax that GCC handles : badly? Thanx : < dunder AT nyongwa DOT montreal DOT qc DOT ca > Many compilers allow you to dereference the NULL pointer, but this is not ANSI C standard. this is one of many possiblities. Bugs that were there all along showing up when you move to a new platform are common. I had a bug that went undetetected thru Microsoft Visual C++, Borlnad C++, and DJGPP showed up when I moved to a Sun (I was deleting a statically allocated array of pointers to dynamic objects, instead of the dynamic objects). Use the debugger to find out what's really going on. -- ============================================ Without my guitar, I am a poet without arms. - Michael Bloomfield ============================================