From: Eli Zaretskii Newsgroups: comp.os.msdos.djgpp Subject: Re: qsort() bug? Or invalid usage??? Date: Fri, 21 Jan 2000 18:04:28 +0200 Organization: NetVision Israel Lines: 11 Message-ID: <3888838C.19172367@is.elta.co.il> References: <867gpd$k0u$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <388758A7 DOT 1B64BDF9 AT cyberoptics DOT com> <388824A4 DOT 7E8CA268 AT is DOT elta DOT co DOT il> NNTP-Posting-Host: ras1-p37.rvt.netvision.net.il Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.netvision.net.il 948470662 3826 62.0.172.39 (21 Jan 2000 16:04:22 GMT) X-Complaints-To: abuse AT netvision DOT net DOT il NNTP-Posting-Date: 21 Jan 2000 16:04:22 GMT X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,ru,hebrew To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Damian Yerrick wrote: > > Eli Zaretskii wrote in message > <388824A4 DOT 7E8CA268 AT is DOT elta DOT co DOT il>... > >AFAIK, ANSI C explicitly allows to access an array one element > >before the first one, provided that you don't write there. > > Which can potentially produce page faults and segfaults. You mean, if you write there? Yes, that can produce unpleasant effects. But if you don't write, then ANSI forbids any segfaults.