This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] dead const/pure/alloca call removal
firstname.lastname@example.org (Kai Henningsen) writes:
| email@example.com (Gabriel Dos Reis) wrote on 09.11.03 in <firstname.lastname@example.org>:
| > Jason Merrill <email@example.com> writes:
| > | On 09 Nov 2003 07:21:30 +0100, Gabriel Dos Reis
| > <firstname.lastname@example.org> wrote: |
| > | > Daniel Jacobowitz <email@example.com> writes:
| > | >
| > | > [...]
| > | >
| > | > | The implementation provides malloc; GCC is merely a part of the
| > | > | implementation. We already assume a conforming library for many
| > | > | optimizations; glibc doesn't provide strlen either.
| > | >
| > | > Sure, but isn't a tracing malloc a conforming implementation?
| > |
| > | AFAIK replacing malloc at all is nonconforming.
| > It would be nonconforming only if GCC provided an implementation for
| > malloc/free.
| That is of course utter nonsense. Conformance of user programs is not in
| any way dependant on how the implementation is organized internally.
What is "utter nonsense" is to pretend that this issue is internal
organization and conformance of user programs does not depend on it.
As is, GCC does not provide an implementation for malloc, and a user
program that calls malloc has to take special actions (e.g. thrid
party library) to have it translated into a successful executable.
| You can, of course, debate what ways of organizing the implementation are
| useful, practical, whatever - but none of this can possibly change what is
| conformant for a user program to do.
Did you read that my concerns are from useful and pratical point of view?
Again, if all is needed is to provide a compiler for strictly
conforming programs, then "cp /bin/sh gcc" is a cheaper answer. It
may even produce a faster executable.