This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: malloc attributes and realloc
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: dewar at gnat dot com
- Cc: bkorb at veritas dot com, gcc at gcc dot gnu dot org
- Date: Fri, 2 Jan 2004 11:27:02 -0500 (EST)
- Subject: Re: malloc attributes and realloc
- References: <3FF4EB4F.E8115D24@veritas.com> <3FF4540E.1040009@gnat.com>
> 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.
Hum, that is surprising. If we can't rely on pointer ordering, then
libiberty/alloca.c wouldn't work since it uses exactly this ordering
to detect the stack growth direction and also to detect when storage
can be freed.
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu