aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-07 08:31:26 +0000
committerChris Lattner <sabre@nondot.org>2002-04-07 08:31:26 +0000
commitb55679d427615c969477f002bccb9c6aeafce6c8 (patch)
tree5b7913961c0a8e31d771ab47ebb6506cb754f2b9
parentdb59c17853233d854f50629cc350e18293652541 (diff)
Add a better comment to explain what is going on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2139 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/AsmParser/Lexer.l5
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
}