delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/01/28/09:36:27

From: rpolzer AT web DOT de (Rudolf Polzer)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Windows ME and DJGPP
References: <20010120205730 DOT 25849 DOT 00000491 AT ng-fd1 DOT aol DOT com> <3a6b7917 DOT 10793503 AT news DOT sci DOT fi> <3A6CB71F DOT 8B4E86C9 AT phekda DOT freeserve DOT co DOT uk> <94k3dc$lf9$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <slrn96u191 DOT 2cl DOT rpolzer AT rebounce DOT rpolzer-lx> <94pm3k$1qf$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <slrn970p9v DOT 28f DOT rpolzer AT rebounce DOT rpolzer-lx> <94rrk4$sro$1 AT antares DOT lu DOT erisoft DOT se> <slrn973r3m DOT 1vo DOT rpolzer AT rebounce DOT rpolzer-lx> <9003-Sat27Jan2001104054+0200-eliz AT is DOT elta DOT co DOT il> <slrn9758nt DOT kg DOT rpolzer AT rebounce DOT rpolzer-lx> <qui57ts29nkob9g12f7rc2pual2hn501c6 AT 4ax DOT com>
X-newsgroup: comp.os.msdos.djgpp
X-Mailer: GehtDichNenScheissdreckAn 1.0
User-Agent: GehtDichNenScheissdreckAn 1.0
Message-ID: <slrn978aq2.11k.rpolzer@rebounce.rpolzer-lx>
User-Agent: slrn/0.9.6.2 (Linux)
Date: Sun, 28 Jan 2001 15:22:58 +0100
Lines: 47
NNTP-Posting-Host: 213.6.53.235
X-Trace: 980692491 news.freenet.de 3417 213.6.53.235
X-Complaints-To: abuse AT freenet DOT de
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk> schrieb Folgendes:
> rpolzer AT web DOT de (Rudolf Polzer) wrote:
> 
> > But I just also tested a simple test program:
> > 
> > void main()
> > {
> >  char *p = 0;
> >  *p = 'X';
> > }
> > 
> > which compiles (with a warning about main being void) 
> 
> It compiles cleanly like this:
> 
> int main(void)
> {
>  char *p = 0;
>  *p = 'X';
>  
>  return 0;
> }

I know, I posted my code because it is shorter, but said clearly that I
know about the warning and do not want to read about this.

> > and crashes with a
> > SIGSEGV at the correct address. I see a GPF, but this is still enough
> > information because of the correct line numbers.
> 
> I only see a SIGSEGV in real-mode DOS, not in Windows 95...

I use WinME. (still the latest RC and not the real final version, I got
the RC original CD-ROM and do not want to buy the real WinME)

> > 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.

-- 
Nuper erat medicus, nunc est vispillo, Diaulus:
Quod vispillo facit, fecerat et medicus.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019