This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: malloc attributes and realloc
- From: Robert Dewar <dewar at gnat dot com>
- To: Bruce Korb <bkorb at veritas dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 02 Jan 2004 00:08:30 +0700
- Subject: Re: malloc attributes and realloc
- References: <3FF4EB4F.E8115D24@veritas.com>
Bruce Korb wrote:
You can. You *cannot* compare the data pointed to by what now could
be unmapped memory, but by golly you certainly can compare the pointer
values.
I don't understand your reasoning here. C does not permit general
pointer comparisons, or rather does not provide defined semantics
for all such comparisons, for example, you cannot use > on pointers
and expect it to create a well-ordering of pointers.