chandlerc added a comment.

I agree with both Marshall and Hal.

However, I'm also not opposed to platforms opting out if this if they want to. 
If a particular platform wants to define the behavior of null pointers passed 
to these functions, that seems like a reasonable thing to support here. The two 
platforms that seem interested in supporting null pointers here are Android and 
FreeBSD, so I think we should disable this for those platforms.

But I want to point out and emphasize what Hal said: the compiler can *already 
do this*. Please make sure that both of those platforms configure Clang and 
LLVM to specially handle these routines to support null pointers. You're 
providing a conforming extension for your platform, but you can't *just* do 
that in the STL, you need to do that at every layer of the toolchain.

For Linux, given the *very* long precedent of glibc and GCC behavior, I'm 
confident we want these annotations. I'll let folks that actually support other 
platforms chime up for the cases they care about.


http://reviews.llvm.org/D11948



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to