C standard compliance?

2014-01-29 Thread David Kastrup
Hi, I am wondering if I may compare pointers with that have been created using different calls of malloc. The C standard does not allow this (inequalities are only allowed for pointers into the same structure) to allow for some cheapskate sort of comparison in segmented architectures. Now of

Re: C standard compliance?

2014-01-29 Thread Junio C Hamano
David Kastrup d...@gnu.org writes: Hi, I am wondering if I may compare pointers with that have been created using different calls of malloc. The C standard does not allow this (inequalities are only allowed for pointers into the same structure) to allow for some cheapskate sort of

Re: C standard compliance?

2014-01-29 Thread David Kastrup
Junio C Hamano gits...@pobox.com writes: David Kastrup d...@gnu.org writes: Hi, I am wondering if I may compare pointers with that have been created using different calls of malloc. The C standard does not allow this (inequalities are only allowed for pointers into the same structure) to

Re: C standard compliance?

2014-01-29 Thread Philip Oakley
From: David Kastrup d...@gnu.org Junio C Hamano gits...@pobox.com writes: David Kastrup d...@gnu.org writes: Hi, I am wondering if I may compare pointers with that have been created using different calls of malloc. The C standard does not allow this (inequalities are only allowed for

Re: C standard compliance?

2014-01-29 Thread brian m. carlson
On Wed, Jan 29, 2014 at 09:52:45PM +0100, David Kastrup wrote: Junio C Hamano gits...@pobox.com writes: Hmm... if you were to implement a set of pointers in such a way that you can cheaply tell if an unknown pointer belongs to that set, you would use a hashtable, keyed with something that

Re: C standard compliance?

2014-01-29 Thread David Kastrup
brian m. carlson sand...@crustytoothpaste.net writes: On Wed, Jan 29, 2014 at 09:52:45PM +0100, David Kastrup wrote: Junio C Hamano gits...@pobox.com writes: Hmm... if you were to implement a set of pointers in such a way that you can cheaply tell if an unknown pointer belongs to that set,