[PATCH] ADT: Remove misaligned pointeres from DenseMapInfo

Duncan P. N. Exon Smith dexonsmith at apple.com
Sun Sep 21 14:17:03 PDT 2014


> On 2014 Sep 21, at 05:25, David Majnemer <david.majnemer at gmail.com> wrote:
> 
> C++ requires that pointers point to sufficiently well aligned addresses.

I thought this only applied to allocated memory.

> getEmptyKey() and getTombstoneKey() would cast -1 and -2 to arbitrary
> pointer types which would violate this requirement.

What part of the standard labels this undefined behaviour?  I can't
find it.



More information about the llvm-commits mailing list