[cfe-dev] Non-portable cast in DataflowValues.h

Justin Handville uniheliodem at gmail.com
Sun Sep 23 16:59:46 PDT 2007


Yes.  That will do it.  :-)

On 9/23/07, Chris Lattner <clattner at apple.com> wrote:
>
> On Sep 23, 2007, at 4:47 PM, Justin Handville wrote:
>
> > I am getting the following compile error when compiling for x86_64
> > FreeBSD.  The getHashValue function assumes that unsigned int and a
> > pointer are the same size, which is not true in the x86_64 ABI.
>
> Does this fix it?
> http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-
> Mon-20070917/002072.html
>
> -Chris
>
> > In file included from
> > /packages/llvm-trunk/tools/clang/Analysis/../include/clang/Analysis/
> > UninitializedValues.h:19,
> >                  from UninitializedValues.cpp:14:
> > /packages/llvm-trunk/tools/clang/Analysis/../include/clang/Analysis/
> > DataflowValues.h:
> > In static member function 'static unsigned int
> > llvm::DenseMapInfo<clang::CFG::Edge>::getHashValue(const
> > clang::CFG::Edge&)':
> > /packages/llvm-trunk/tools/clang/Analysis/../include/clang/Analysis/
> > DataflowValues.h:40:
> > error: cast from 'const clang::CFGBlock*' to 'unsigned int' loses
> > precision
> > /packages/llvm-trunk/tools/clang/Analysis/../include/clang/Analysis/
> > DataflowValues.h:41:
> > error: cast from 'const clang::CFGBlock*' to 'unsigned int' loses
> > precision
> > /packages/llvm-trunk/tools/clang/Analysis/../include/clang/Analysis/
> > DataflowValues.h:42:
> > error: cast from 'const clang::CFGBlock*' to 'unsigned int' loses
> > precision
> > /packages/llvm-trunk/tools/clang/Analysis/../include/clang/Analysis/
> > DataflowValues.h:43:
> > error: cast from 'const clang::CFGBlock*' to 'unsigned int' loses
> > precision
> > gmake[1]: *** [/packages/llvm-trunk/tools/clang/Analysis/Debug/
> > UninitializedValues.o]
> > Error 1
> > gmake[1]: Leaving directory `/packages/llvm-trunk/tools/clang/
> > Analysis'
> > gmake: *** [all] Error 1
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>



More information about the cfe-dev mailing list