delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-workers-bounces using -f |
Date: | Wed, 21 Jan 2004 11:48:24 +0200 (EET) |
From: | Esa A E Peuha <peuha AT cc DOT helsinki DOT fi> |
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: | <Pine.OSF.4.58.0401211124440.9432@sirppi.helsinki.fi> |
References: | <Pine DOT OSF DOT 4 DOT 58 DOT 0401201143590 DOT 29095 AT sirppi DOT helsinki DOT fi> |
<200401201626 DOT i0KGQ7d8026812 AT envy DOT delorie DOT com> | |
MIME-Version: | 1.0 |
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 |
On Tue, 20 Jan 2004, DJ Delorie wrote: > 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. Strict ANSI C may say so, but GNU C has 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 the 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. Yes, but I thought that the difference was a reason _not_ to use literal zero when it would be implicitly cast to a pointer. -- Esa Peuha student of mathematics at the University of Helsinki http://www.helsinki.fi/~peuha/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |