This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] dead const/pure/alloca call removal


Jason Merrill <jason@redhat.com> writes:

| On 09 Nov 2003 20:37:49 +0100, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
| 
| > | AFAIK replacing malloc at all is nonconforming.
| >
| > It would be nonconforming only if GCC provided an implementation for
| > malloc/free. 
| >
| > |  It just happens to work on most Unix systems.
| >
| > This ought to work as currently GCC does not provide an implementation
| > of malloc.
| 
| Why do you think it is relevant whether or not GCC provides the
| implementation?

If GCC provides the implementation, it can pretend it knows what it does.
Currently, as GCC does not provide the implementation, it cannot
pretend it knows all the effects of calling malloc.  What it can
assume is that the return value, if non-NULL, obeys the non-aliasing
requirement. It can't assume about side-effect beyond that property.
That matches current parctice.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]