diff options
-rw-r--r-- | lib/AsmParser/Lexer.l | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/AsmParser/Lexer.l b/lib/AsmParser/Lexer.l index a5cb4eff26..9cfe9fd78e 100644 --- a/lib/AsmParser/Lexer.l +++ b/lib/AsmParser/Lexer.l @@ -70,7 +70,10 @@ static double HexToFP(const char *Buffer) { assert(sizeof(double) == sizeof(Result) && "Data sizes incompatible on this target!"); - void *ProxyPointer = &Result; // Break TBAA correctly + // Behave nicely in the face of C TBAA rules... see: + // http://www.nullstone.com/htmls/category/aliastyp.htm + // + char *ProxyPointer = (char*)&Result; return *(double*)ProxyPointer; // Cast Hex constant to double } |