Re: when can realloc fail?
- From: "Old Wolf" <oldwolf@xxxxxxxxxxxxxx>
- Date: 1 Apr 2007 15:52:46 -0700
On Apr 2, 8:17 am, "santosh" <santosh....@xxxxxxxxx> wrote:
But realloc with a new size of zero either returns a
null pointer, upon failure, or returns an indeterminate value.
I don't see any text in the standard to support this.
In fact, it seems absurd, as undefined behaviour would
be caused as soon as the user checked or stored the
return value.
The text in 7.20.3.4 in C99 only says that the items pointed
to by the return value are indeterminate.
.
- Follow-Ups:
- Re: when can realloc fail?
- From: pete
- Re: when can realloc fail?
- References:
- when can realloc fail?
- From: banansol
- Re: when can realloc fail?
- From: santosh
- Re: when can realloc fail?
- From: banansol
- Re: when can realloc fail?
- From: santosh
- when can realloc fail?
- Prev by Date: Re: An interesting C problem
- Next by Date: Re: Reading a key inside a loop
- Previous by thread: Re: when can realloc fail?
- Next by thread: Re: when can realloc fail?
- Index(es):
Relevant Pages
|
|