dberlin added a comment.

In https://reviews.llvm.org/D31885#727529, @efriedma wrote:

> > Such an effective type change must be more explicit than "i allocated 
> > typeless memory, and so i can do what i want with it".
>
> How can you change the effective type of malloc'ed memory in C, if storing a 
> value of a new type doesn't have any effect?  memset?  A new C language 
> feature?  Something else?


memcpy is the traditional way, but in some sense it doesn't matter.
What you've pointed out is a clear standards bug in the sense that there *is no 
way* to implement it without removing TBAA from the standard.


Repository:
  rL LLVM

https://reviews.llvm.org/D31885



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

Reply via email to