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


kaih@khms.westfalen.de (Kai Henningsen) writes:

| gdr@integrable-solutions.net (Gabriel Dos Reis)  wrote on 09.11.03 in <m3n0b5l4du.fsf@uniton.integrable-solutions.net>:
| 
| > Jason Merrill <jason@redhat.com> writes:
| >
| > | On 09 Nov 2003 07:21:30 +0100, Gabriel Dos Reis
| > <gdr@integrable-solutions.net> wrote: |
| > | > Daniel Jacobowitz <drow@mvista.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.

-- Gaby


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