[PATCH] D31885: Remove TBAA information from LValues representing union members

Daniel Berlin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 14 12:49:31 PDT 2017


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





More information about the cfe-commits mailing list