X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f Date: Fri, 23 Jan 2004 11:54:15 +0200 (EET) From: Esa A E Peuha Sender: peuha AT sirppi DOT helsinki DOT fi To: djgpp-workers AT delorie DOT com Subject: Re: Patch for bsearch In-Reply-To: <200401201626.i0KGQ7d8026812@envy.delorie.com> Message-ID: References: <200401201626 DOT i0KGQ7d8026812 AT envy DOT delorie DOT com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 20 Jan 2004, DJ Delorie wrote: My previous reply to this seems to have been lost. > One major problems with this. > > "void" has no size, so you can't do pointer arithmetic with it. Any > void* must be cast to a pointer to non-void to do pointer arithmetic. In GNU C, sizeof(void) == 1 and therefore arithmetic on void pointers works just like on char pointers. Is there any reason not to use GNU extensions in library sources? > I'm also not a big fan of "NULL" in general, but it's OK in this case. > In general, NULL is *not* the same as a literal zero. I thought the whole point of that difference was _not_ to use literal zero where it would be implicitly cast to a pointer. -- Esa Peuha student of mathematics at the University of Helsinki http://www.helsinki.fi/~peuha/