[LLVMdev] optimization assumes malloc return is non-null
Neil Booth
neil at daikokuya.co.uk
Wed May 14 07:23:20 PDT 2008
Jonathan S. Shapiro wrote:-
> One more question on this.
>
> The substitution of malloc() is predicated on the assumption that the
> compiler knows the implementation of malloc(), and the argument for that
> seems to rest in part on the specification of the Standard C Library.
>
> But I am not aware of any requirement that compliant C code must be
> linked with the Standard C Library. If this requirement does not exist,
> then no portion of the C library specification can be used to justify a
> compile-time optimization unless we have some sort of compilation model
> information that tells us the C library can be assumed.
>
> Is there a requirement somewhere in the C *Language* Specification that
> ties all of this together in the required way?
Reserved identifiers and header inclusion.
Neil.
More information about the llvm-dev
mailing list